summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2012-11-05 01:06:13 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2012-11-05 01:06:13 (GMT)
commit9d95cbeaf97887beca3bbee36cb5466268bdf8e1 (patch)
treed40d31258bbd85172efbd2fe5a7d4a8d236d924a /Lib/test
parent519f43844babca8bb23cfc2cd0ba9f5ee0b26034 (diff)
downloadcpython-9d95cbeaf97887beca3bbee36cb5466268bdf8e1.zip
cpython-9d95cbeaf97887beca3bbee36cb5466268bdf8e1.tar.gz
cpython-9d95cbeaf97887beca3bbee36cb5466268bdf8e1.tar.bz2
Close #15165: Fix test_email on Windows 64 bits
Use year 1990 instead of year 1970 to avoid issues with negative timestamps.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_email/test_utils.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_email/test_utils.py b/Lib/test/test_email/test_utils.py
index 0ade770..622ef3a 100644
--- a/Lib/test/test_email/test_utils.py
+++ b/Lib/test/test_email/test_utils.py
@@ -91,7 +91,7 @@ class LocaltimeTests(unittest.TestCase):
@test.support.run_with_tz('EST+05EDT,M3.2.0,M11.1.0')
def test_localtime_epoch_utc_daylight_true(self):
test.support.patch(self, time, 'daylight', True)
- t0 = datetime.datetime(1970, 1, 1, tzinfo = datetime.timezone.utc)
+ t0 = datetime.datetime(1990, 1, 1, tzinfo = datetime.timezone.utc)
t1 = utils.localtime(t0)
t2 = t0 - datetime.timedelta(hours=5)
t2 = t2.replace(tzinfo = datetime.timezone(datetime.timedelta(hours=-5)))
@@ -100,7 +100,7 @@ class LocaltimeTests(unittest.TestCase):
@test.support.run_with_tz('EST+05EDT,M3.2.0,M11.1.0')
def test_localtime_epoch_utc_daylight_false(self):
test.support.patch(self, time, 'daylight', False)
- t0 = datetime.datetime(1970, 1, 1, tzinfo = datetime.timezone.utc)
+ t0 = datetime.datetime(1990, 1, 1, tzinfo = datetime.timezone.utc)
t1 = utils.localtime(t0)
t2 = t0 - datetime.timedelta(hours=5)
t2 = t2.replace(tzinfo = datetime.timezone(datetime.timedelta(hours=-5)))
@@ -108,14 +108,14 @@ class LocaltimeTests(unittest.TestCase):
def test_localtime_epoch_notz_daylight_true(self):
test.support.patch(self, time, 'daylight', True)
- t0 = datetime.datetime(1970, 1, 1)
+ t0 = datetime.datetime(1990, 1, 1)
t1 = utils.localtime(t0)
t2 = utils.localtime(t0.replace(tzinfo=None))
self.assertEqual(t1, t2)
def test_localtime_epoch_notz_daylight_false(self):
test.support.patch(self, time, 'daylight', False)
- t0 = datetime.datetime(1970, 1, 1)
+ t0 = datetime.datetime(1990, 1, 1)
t1 = utils.localtime(t0)
t2 = utils.localtime(t0.replace(tzinfo=None))
self.assertEqual(t1, t2)