[issue22932] email.utils.formatdate uses unreliable time.timezone constant
Alexander Belopolsky
report at bugs.python.org
Mon Nov 24 18:43:30 CET 2014
Alexander Belopolsky added the comment:
The proposed patch will not work on platforms that don't support tm_gmtoff. A proper fix may look like this:
dt = datetime.fromtimestamp(timeval, timezone.utc)
if localtime:
dt = dt.astimezone()
return format_datetime(dt, usegmt)
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22932>
_______________________________________
More information about the Python-bugs-list
mailing list