Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0cd4790

Browse files
author
Victor Stinner
committed
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
1 parent eb58794 commit 0cd4790

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
@@ -206,7 +206,12 @@ def test_tzset(self):
206206
environ['TZ'] = victoria
207207
time.tzset()
208208
self.assertNotEqual(time.gmtime(xmas2002), time.localtime(xmas2002))
209-
self.assertTrue(time.tzname[0] == 'AEST', str(time.tzname[0]))
209+
210+
# Issue #11886: Australian Eastern Standard Time (UTC+10) is called
211+
# "EST" (as Eastern Standard Time, UTC-5) instead of "AEST" on some
212+
# operating systems (e.g. FreeBSD), which is wrong. See for example
213+
# this bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=93810
214+
self.assertIn(time.tzname[0], ('AEST' 'EST'), time.tzname[0])
210215
self.assertTrue(time.tzname[1] == 'AEDT', str(time.tzname[1]))
211216
self.assertEqual(len(time.tzname), 2)
212217
self.assertEqual(time.daylight, 1)

0 commit comments

Comments
 (0)