[New-bugs-announce] [issue23332] datetime.isoformat() -> explicitly mark UTC string as such
report at bugs.python.org
Tue Jan 27 18:37:29 CET 2015
New submission from Mirko Vogt:
isoformat() string'yfies a DateTime-object according to ISO 8601, which states that, if no timezone is specified, the string is supposed to be interpreted as UTC implicitly. isoformat() doesn't append any TZ if the object is UTC - so far so good.
That is not Python's fault - however considering the issues this behaviour could cause as well as following the philosophy 'explicit is better than implicit', I'd suggest explicitly marking UTC-strings as such by adding a trailing 'Z'. According ISO 8601 that is totally fine, optional though.
title: datetime.isoformat() -> explicitly mark UTC string as such
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce