[issue37962] Improve ISO 8601 timezone support in the datetime.fromisoformat() method

2019-08-27 Thread Zeth
Zeth added the comment: Did you read the attached PR? For three lines longer, the method becomes more generally useful now. As pointed out in the other thread that you pointed to, Javascript can parse Python's seralised datetime object but Python cannot parse Javascript's due to the fact th

[issue37962] Improve ISO 8601 timezone support in the datetime.fromisoformat() method

2019-08-27 Thread Paul Ganssle
Paul Ganssle added the comment: This is a duplicate of #35829. The reason that 'Z' is not supported is that `fromisoformat()` is not a general ISO 8601 parser, but rather is intended to be the inverse of `isoformat()`. See the documentation here: https://docs.python.org/dev/library/datetime

[issue37962] Improve ISO 8601 timezone support in the datetime.fromisoformat() method

2019-08-27 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +belopolsky, p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue37962] Improve ISO 8601 timezone support in the datetime.fromisoformat() method

2019-08-27 Thread Zeth
New submission from Zeth : The datetime.datetime.fromisoformat() method unnecessarily rejects datetime strings that are valid under ISO 8601 if timezone uses the UTC designator or it only has hours. In ISO 8601, section 4.2.5.1: "When it is required to indicate the difference between local