This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rdb
Recipients rdb
Date 2019-01-25.19:36:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1548445007.56.0.14925163397.issue35829@roundup.psfhosted.org>
In-reply-to
Content
The fromisoformat() function added in 3.7 is a very welcome addition.  But one quite noticeable absence was the inability to parse Z instead of +00:00 as the timezone suffix.

Its absence is particularly noticeable given how ubiquitous use of Z is in ISO 8601 timestamps on the web; it is also part of the RFC 3339 subset.  In particular, JavaScript produces it in its canonical ISO 8601 format and is therefore quite common in JSON APIs; this would be the only piece missing to parse ISO dates produced by JavaScript correctly.

I realise that the function was not intended to be able to parse *all* timestamps.  But given the triviality of this change, the ubiquity of this particular formatting feature, and the fact that this change is designed in particular for operability with the widely-used JavaScript date format, I don't think this is a slippery slope, and I would personally see no harm in accepting a 'Z' instead of a timezone.

I am happy to follow up with a patch for this, but would first like confirmation that there is any chance that such a change would be accepted.  Thanks for your consideration!
History
Date User Action Args
2019-01-25 19:36:50rdbsetrecipients: + rdb
2019-01-25 19:36:47rdbsetmessageid: <1548445007.56.0.14925163397.issue35829@roundup.psfhosted.org>
2019-01-25 19:36:47rdblinkissue35829 messages
2019-01-25 19:36:47rdbcreate