diff options
author | Alexander Belopolsky <alexander.belopolsky@gmail.com> | 2012-06-22 00:34:09 (GMT) |
---|---|---|
committer | Alexander Belopolsky <alexander.belopolsky@gmail.com> | 2012-06-22 00:34:09 (GMT) |
commit | a07548e97bd819884ed1ddcfedb0fcbcbfdc58fe (patch) | |
tree | 8b48da4855caf7c49af6246ea74a68ad263a6cd4 /Lib/email/test | |
parent | 9ed8b4e4cac4f38109c3e08a8bfd19b7f6ad1c88 (diff) | |
download | cpython-a07548e97bd819884ed1ddcfedb0fcbcbfdc58fe.zip cpython-a07548e97bd819884ed1ddcfedb0fcbcbfdc58fe.tar.gz cpython-a07548e97bd819884ed1ddcfedb0fcbcbfdc58fe.tar.bz2 |
Issue #14653: email.utils.mktime_tz() no longer relies on system
mktime() when timezone offest is supplied.
Diffstat (limited to 'Lib/email/test')
-rw-r--r-- | Lib/email/test/test_email.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py index 5db34dc..65b3ebd 100644 --- a/Lib/email/test/test_email.py +++ b/Lib/email/test/test_email.py @@ -2585,6 +2585,12 @@ class TestMiscellaneous(TestEmailBase): eq(time.localtime(t)[:6], timetup[:6]) eq(int(time.strftime('%Y', timetup[:9])), 2003) + def test_mktime_tz(self): + self.assertEqual(utils.mktime_tz((1970, 1, 1, 0, 0, 0, + -1, -1, -1, 0)), 0) + self.assertEqual(utils.mktime_tz((1970, 1, 1, 0, 0, 0, + -1, -1, -1, 1234)), -1234) + def test_parsedate_y2k(self): """Test for parsing a date with a two-digit year. |