I need to parse RFC 3339 strings like \"2008-09-03T20:56:35.450686Z\" into Python\'s datetime type.
\"2008-09-03T20:56:35.450686Z\"
datetime
I have found strptime in the Python sta
Just use the python-dateutil module:
python-dateutil
>>> import dateutil.parser as dp >>> t = '1984-06-02T19:05:00.000Z' >>> parsed_t = dp.parse(t) >>> print(parsed_t) datetime.datetime(1984, 6, 2, 19, 5, tzinfo=tzutc())
Documentation