import dateutil.parser
dateutil.parser.parse('2008-09-03T20:56:35.450686Z')
dateutil.parser.parse('2008-09-03T20:56:35.450686')
dateutil.parser.parse('20080903T205635.450686')
How to parse an ISO 8601-formatted date?