Skip to content

Commit 3e2cee4

Browse files
serhiy-storchakaencukou
authored andcommitted
[3.10] gh-113027: Fix test_variable_tzname in test_email (GH-113821)
Determine the support of the Kyiv timezone by checking the result of astimezone() which uses the system tz database and not the one populated by zoneinfo. (cherry picked from commit 931d7e0) Co-authored-by: Serhiy Storchaka <[email protected]>
1 parent 9286ab3 commit 3e2cee4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Lib/test/test_email/test_utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ def test_localtime_epoch_notz_daylight_false(self):
152152
def test_variable_tzname(self):
153153
t0 = datetime.datetime(1984, 1, 1, tzinfo=datetime.timezone.utc)
154154
t1 = utils.localtime(t0)
155+
if t1.tzname() == 'Europe':
156+
self.skipTest("Can't find a Kyiv timezone database")
155157
self.assertEqual(t1.tzname(), 'MSK')
156158
t0 = datetime.datetime(1994, 1, 1, tzinfo=datetime.timezone.utc)
157159
t1 = utils.localtime(t0)

0 commit comments

Comments
 (0)