mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Issue#26616:Fixed a bug in datetime.astimezone() method.
This commit is contained in:
parent
84ca9fe145
commit
1dcf4f9ee5
3 changed files with 16 additions and 1 deletions
|
@ -3426,6 +3426,14 @@ class TestDateTimeTZ(TestDateTime, TZInfoBase, unittest.TestCase):
|
|||
self.assertEqual(dt, local)
|
||||
self.assertEqual(local.strftime("%z %Z"), "-0400 EDT")
|
||||
|
||||
@support.run_with_tz('EST+05EDT,M3.2.0,M11.1.0')
|
||||
def test_astimezone_default_near_fold(self):
|
||||
# Issue #26616.
|
||||
u = datetime(2015, 11, 1, 5, tzinfo=timezone.utc)
|
||||
t = u.astimezone()
|
||||
s = t.astimezone()
|
||||
self.assertEqual(t.tzinfo, s.tzinfo)
|
||||
|
||||
def test_aware_subtract(self):
|
||||
cls = self.theclass
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue