We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7398f51 commit 1d0c65fCopy full SHA for 1d0c65f
1 file changed
Lib/test/datetimetester.py
@@ -5661,6 +5661,15 @@ def test_astimezone_default_near_fold(self):
5661
s = t.astimezone()
5662
self.assertEqual(t.tzinfo, s.tzinfo)
5663
5664
+ @unittest.skipIf(sys.platform != "win32", "gh-148658 only affects Windows")
5665
+ def test_astimezone_negative_timestamp_dst(self):
5666
+ # gh-148658: astimezone() returned DST name for negative timestamps
5667
+ # on Windows. Verify that the timezone name is consistent between
5668
+ # negative and non-negative timestamps.
5669
+ dt_neg1 = self.theclass.fromtimestamp(-1).astimezone()
5670
+ dt_zero = self.theclass.fromtimestamp(0).astimezone()
5671
+ self.assertEqual(dt_neg1.tzname(), dt_zero.tzname())
5672
+
5673
def test_aware_subtract(self):
5674
cls = self.theclass
5675
0 commit comments