Skip to content

Commit bc9f0c6

Browse files
author
Victor Stinner
committed
(Merge 3.2) Issue #11886: workaround an OS bug (time zone data) in test_time
Australian Eastern Standard Time (UTC+10) is called "EST" (as Eastern Standard Time, UTC-5) instead of "AEST" on some operating systems (e.g. FreeBSD), which is wrong. See for example this bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=93810
2 parents 0c4fbff + 0cd4790 commit bc9f0c6

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Lib/test/test_time.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,12 @@ def test_tzset(self):
250250
environ['TZ'] = victoria
251251
time.tzset()
252252
self.assertNotEqual(time.gmtime(xmas2002), time.localtime(xmas2002))
253-
self.assertTrue(time.tzname[0] == 'AEST', str(time.tzname[0]))
253+
254+
# Issue #11886: Australian Eastern Standard Time (UTC+10) is called
255+
# "EST" (as Eastern Standard Time, UTC-5) instead of "AEST" on some
256+
# operating systems (e.g. FreeBSD), which is wrong. See for example
257+
# this bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=93810
258+
self.assertIn(time.tzname[0], ('AEST' 'EST'), time.tzname[0])
254259
self.assertTrue(time.tzname[1] == 'AEDT', str(time.tzname[1]))
255260
self.assertEqual(len(time.tzname), 2)
256261
self.assertEqual(time.daylight, 1)

0 commit comments

Comments
 (0)