New submission from Fred Drake <fdr...@gmail.com>:
A local time offset of '-0000' is not handled the same way as an offset of '+0000', but I'd expect it would be: >>> import email.utils >>> >>> email.utils.parsedate_to_datetime('9 Dec 2021 08:52:04 -0000') datetime.datetime(2021, 12, 9, 8, 52, 4) >>> email.utils.parsedate_to_datetime('9 Dec 2021 08:52:04 +0000') datetime.datetime(2021, 12, 9, 8, 52, 4, tzinfo=datetime.timezone.utc) I observe the same behavior on Python 3.9.9 and 3.10.1. ---------- components: email messages: 408149 nosy: barry, fdrake, r.david.murray priority: normal severity: normal status: open title: email.utils.parsedate_to_datetime() handling of -0000 offset type: behavior versions: Python 3.10, Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue46027> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com