diff --git a/Lib/test/test_strptime.py b/Lib/test/test_strptime.py index 268230f6da78f8..c304521420274c 100644 --- a/Lib/test/test_strptime.py +++ b/Lib/test/test_strptime.py @@ -658,7 +658,7 @@ def setUp(self): @skip_if_buggy_ucrt_strfptime def test_julian_calculation(self): # Make sure that when Julian is missing that it is calculated - format_string = "%Y %m %d %H %M %S %w %Z" + format_string = "%Y %m %d %H %M %S %w" result = _strptime._strptime_time(time.strftime(format_string, self.time_tuple), format_string) self.assertTrue(result.tm_yday == self.time_tuple.tm_yday, @@ -668,7 +668,7 @@ def test_julian_calculation(self): @skip_if_buggy_ucrt_strfptime def test_gregorian_calculation(self): # Test that Gregorian date can be calculated from Julian day - format_string = "%Y %H %M %S %w %j %Z" + format_string = "%Y %H %M %S %w %j" result = _strptime._strptime_time(time.strftime(format_string, self.time_tuple), format_string) self.assertTrue(result.tm_year == self.time_tuple.tm_year and @@ -683,7 +683,7 @@ def test_gregorian_calculation(self): @skip_if_buggy_ucrt_strfptime def test_day_of_week_calculation(self): # Test that the day of the week is calculated as needed - format_string = "%Y %m %d %H %S %j %Z" + format_string = "%Y %m %d %H %S %j" result = _strptime._strptime_time(time.strftime(format_string, self.time_tuple), format_string) self.assertTrue(result.tm_wday == self.time_tuple.tm_wday, diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py index 5312faa50774ec..cbc6a7f480ffe2 100644 --- a/Lib/test/test_time.py +++ b/Lib/test/test_time.py @@ -325,7 +325,7 @@ def test_strptime(self): tt = time.gmtime(self.t) for directive in ('a', 'A', 'b', 'B', 'c', 'd', 'H', 'I', 'j', 'm', 'M', 'p', 'S', - 'U', 'w', 'W', 'x', 'X', 'y', 'Y', 'Z', '%'): + 'U', 'w', 'W', 'x', 'X', 'y', 'Y', '%'): format = '%' + directive if directive == 'd': format += ',%Y' # Avoid GH-70647.