From c4bec783c884adc4ace6eea4eaa8748645b920bc Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Tue, 27 Jun 2023 18:28:20 +0200 Subject: [PATCH] Fix ftbfs with newer tzdata Newer tzdata contains some corrections of timezones having effect on years before 1930. --- pytz/tests/test_tzinfo.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pytz/tests/test_tzinfo.py b/pytz/tests/test_tzinfo.py index beb0490..094c2d3 100644 --- a/pytz/tests/test_tzinfo.py +++ b/pytz/tests/test_tzinfo.py @@ -605,18 +605,18 @@ class LocalTestCase(unittest.TestCase): loc_time = loc_tz.localize(datetime(1930, 5, 10, 0, 0, 0)) # Actually +00:19:32, but Python datetime rounds this - self.assertEqual(loc_time.strftime('%Z%z'), 'AMT+0020') + self.assertEqual(loc_time.strftime('%Z%z'), 'WEST+0100') loc_time = loc_tz.localize(datetime(1930, 5, 20, 0, 0, 0)) # Actually +00:19:32, but Python datetime rounds this - self.assertEqual(loc_time.strftime('%Z%z'), 'NST+0120') + self.assertEqual(loc_time.strftime('%Z%z'), 'WEST+0100') loc_time = loc_tz.localize(datetime(1940, 5, 10, 0, 0, 0)) # pre-2017a, abbreviation was NCT - self.assertEqual(loc_time.strftime('%Z%z'), '+0020+0020') + self.assertEqual(loc_time.strftime('%Z%z'), 'WEST+0100') loc_time = loc_tz.localize(datetime(1940, 5, 20, 0, 0, 0)) - self.assertEqual(loc_time.strftime('%Z%z'), 'CEST+0200') + self.assertEqual(loc_time.strftime('%Z%z'), 'WEST+0100') loc_time = loc_tz.localize(datetime(2004, 2, 1, 0, 0, 0)) self.assertEqual(loc_time.strftime('%Z%z'), 'CET+0100') @@ -710,7 +710,7 @@ class LocalTestCase(unittest.TestCase): loc_dt = utc_dt.astimezone(tz) self.assertEqual( loc_dt.strftime('%Y-%m-%d %H:%M:%S %Z%z'), - '1914-01-01 14:00:00 AMT+0020' + '1914-01-01 13:40:00 WET+0000' ) # And get back... -- 2.41.0