[issue7584] datetime.rfcformat() for Date and Time on the Internet

Martin Pool report at bugs.python.org
Mon Aug 22 08:41:02 CEST 2011


Martin Pool <mbp at sourcefrog.net> added the comment:

Z is well established as meaning "UTC time" <http://en.wikipedia.org/wiki/Coordinated_Universal_Time#Time_zones> so shouldn't be used for "zone not known."  rfc 3393 is clear that it's equivalent to +00:00.  

So the questions seem to be:
 * should there be an included battery to do this format at all?
 * should it represent utc as '+00:00' or as 'Z' by default - applications should have the choice.

It's probably reasonable to assume correct Python application code using datetime objects will know whether they have a local, utc, or unknown time.

The current patch does not seem to have any way to format an object with a declared UTC tzinfo as having a 'Z' prefix, which would be useful.

----------
nosy: +poolie

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7584>
_______________________________________


More information about the Python-bugs-list mailing list