[issue15873] "datetime" cannot parse ISO 8601 dates and times
Alexander Belopolsky
report at bugs.python.org
Sun Sep 9 18:25:32 CEST 2012
Alexander Belopolsky added the comment:
> For what parts of ISO 8601 to accept, there's a standard: RFC3339
This is almost indistinguishable from the idea of accepting .isoformat() and str() results. From what I see the only difference is that 't' is accepted for date/time separator and 'z' is accepted as a timezone.
Let's start with this.
As an ultimate solution, I would like to see something like codec registry so that we can do things like datetime(.., format='rfc3339') or date(.., format='gnu') for GNU parse_datetime. I think this will look more pythonic than strptime(). Of course, strptime format can also be accepted as the value for the format keyword.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15873>
_______________________________________
More information about the Python-bugs-list
mailing list