I supply "2019-04-05T16:55:26Z"
to Python 3's datetime.datetime.fromisoformat
and get Invalid isoformat string
, though the same string works without the Z. ISO8601 allows for the Z - https://en.wikipedia.org/wiki/ISO_8601
$ python3
Python 3.7.2 (default, Feb 12 2019, 08:15:36)
>>> datetime.fromisoformat("2019-04-05T16:55:26Z")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: Invalid isoformat string: '2019-04-05T16:55:26Z'
>>> datetime.fromisoformat("2019-04-05T16:55:26")
datetime.datetime(2019, 4, 5, 16, 55, 26)