File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -5661,6 +5661,15 @@ def test_astimezone_default_near_fold(self):
56615661 s = t .astimezone ()
56625662 self .assertEqual (t .tzinfo , s .tzinfo )
56635663
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+
56645673 def test_aware_subtract (self ):
56655674 cls = self .theclass
56665675
You can’t perform that action at this time.
0 commit comments