Message334365
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! |
|
Date |
User |
Action |
Args |
2019-01-25 19:36:50 | rdb | set | recipients:
+ rdb |
2019-01-25 19:36:47 | rdb | set | messageid: <1548445007.56.0.14925163397.issue35829@roundup.psfhosted.org> |
2019-01-25 19:36:47 | rdb | link | issue35829 messages |
2019-01-25 19:36:47 | rdb | create | |
|