import dateutil.parser
yourdate = dateutil.parser.parse(datestring)
import datetime
datetime.datetime.strptime( "2007-03-04T21:08:12Z", "%Y-%m-%dT%H:%M:%SZ" )
References :
How do I translate a ISO 8601 datetime string into a Python datetime object? - Stack Overflow
pythingspeak/thingspeak.py at master · ninjawil/pythingspeak