summaryrefslogtreecommitdiffstats
path: root/Lib/test/datetimetester.py
diff options
context:
space:
mode:
authorAlexander Belopolsky <alexander.belopolsky@gmail.com>2012-06-22 20:04:19 (GMT)
committerAlexander Belopolsky <alexander.belopolsky@gmail.com>2012-06-22 20:04:19 (GMT)
commit93c9cd07b62371b99f712e41c7bec71dad1c86ec (patch)
treed5520f9b0be4534110efc60ffb5379a74fedc3ad /Lib/test/datetimetester.py
parent5f6213be2d5890d7bc3ba62db58ac1ce0215aaaa (diff)
downloadcpython-93c9cd07b62371b99f712e41c7bec71dad1c86ec.zip
cpython-93c9cd07b62371b99f712e41c7bec71dad1c86ec.tar.gz
cpython-93c9cd07b62371b99f712e41c7bec71dad1c86ec.tar.bz2
Issue #9527: tm_gmtoff has 'correct' sign.
Diffstat (limited to 'Lib/test/datetimetester.py')
-rw-r--r--Lib/test/datetimetester.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/datetimetester.py b/Lib/test/datetimetester.py
index 4181d4f..a417170 100644
--- a/Lib/test/datetimetester.py
+++ b/Lib/test/datetimetester.py
@@ -3278,16 +3278,18 @@ class TestDateTimeTZ(TestDateTime, TZInfoBase, unittest.TestCase):
self.assertEqual(dt.astimezone(None), dt)
self.assertEqual(dt.astimezone(), dt)
+ # Note that offset in TZ variable has the opposite sign to that
+ # produced by %z directive.
@support.run_with_tz('EST+05EDT,M3.2.0,M11.1.0')
def test_astimezone_default_eastern(self):
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