mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Issue #9527: datetime.astimezone() method will now supply a class
timezone instance corresponding to the system local timezone when called with no arguments.
This commit is contained in:
parent
fdc860f310
commit
ff493c9c46
2 changed files with 4 additions and 4 deletions
|
@ -3283,11 +3283,11 @@ class TestDateTimeTZ(TestDateTime, TZInfoBase, unittest.TestCase):
|
|||
dt = self.theclass(2012, 11, 4, 6, 30, tzinfo=timezone.utc)
|
||||
local = dt.astimezone()
|
||||
self.assertEqual(dt, local)
|
||||
self.assertEqual(local.strftime("%z %Z"), "+0500 EST")
|
||||
self.assertEqual(local.strftime("%z %Z"), "+0500 EST")
|
||||
dt = self.theclass(2012, 11, 4, 5, 30, tzinfo=timezone.utc)
|
||||
local = dt.astimezone()
|
||||
self.assertEqual(dt, local)
|
||||
self.assertEqual(local.strftime("%z %Z"), "+0400 EDT")
|
||||
self.assertEqual(local.strftime("%z %Z"), "+0400 EDT")
|
||||
|
||||
def test_aware_subtract(self):
|
||||
cls = self.theclass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue