cpython: 479787100b91 (original) (raw)

Mercurial > cpython

changeset 97170:479787100b91

Issue #22932: Fix timezones in email.utils.formatdate. Patch from Dmitry Shachnev. [#22932]

Robert Collins rbtcollins@hp.com
date Sat, 01 Aug 2015 08:20:04 +1200
parents c13839a3d4fc(current diff)94b43b36e464(diff)
children 74fc1af57c72
files Misc/ACKS Misc/NEWS
diffstat 4 files changed, 31 insertions(+), 23 deletions(-)[+] [-] Lib/email/utils.py 30 Lib/test/test_email/test_utils.py 20 Misc/ACKS 1 Misc/NEWS 3

line wrap: on

line diff

--- a/Lib/email/utils.py +++ b/Lib/email/utils.py @@ -155,30 +155,14 @@ def formatdate(timeval=None, localtime=F # 2822 requires that day and month names be the English abbreviations. if timeval is None: timeval = time.time()

def format_datetime(dt, usegmt=False): """Turn a datetime into a date string as specified in RFC 2822.

--- a/Lib/test/test_email/test_utils.py +++ b/Lib/test/test_email/test_utils.py @@ -136,5 +136,25 @@ class LocaltimeTests(unittest.TestCase): t1 = utils.localtime(t0) self.assertEqual(t1.tzname(), 'EET') +class FormatDateTests(unittest.TestCase): +

+

+ if name == 'main': unittest.main()

--- a/Misc/ACKS +++ b/Misc/ACKS @@ -1282,6 +1282,7 @@ Jerry Seutter Pete Sevander Denis Severson Ian Seyer +Dmitry Shachnev Daniel Shahaf Ha Shao Mark Shannon

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -13,6 +13,9 @@ Core and Builtins Library ------- +- Issue #22932: Fix timezones in email.utils.formatdate.