Skip to content

Commit

Permalink
[3.9] gh-113027: Fix test_variable_tzname in test_email (GH-113821) (G…
Browse files Browse the repository at this point in the history
…H-126477)

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)
  • Loading branch information
encukou authored Nov 12, 2024
1 parent 011fb84 commit fb0b642
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Lib/test/test_email/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ def test_localtime_epoch_notz_daylight_false(self):
def test_variable_tzname(self):
t0 = datetime.datetime(1984, 1, 1, tzinfo=datetime.timezone.utc)
t1 = utils.localtime(t0)
if t1.tzname() == 'Europe':
self.skipTest("Can't find a Kyiv timezone database")
self.assertEqual(t1.tzname(), 'MSK')
t0 = datetime.datetime(1994, 1, 1, tzinfo=datetime.timezone.utc)
t1 = utils.localtime(t0)
Expand Down

0 comments on commit fb0b642

Please sign in to comment.