Currently I'm writing a small python application where I get a date of the following format (RFC3339) from a webserver:
2016-01-29T20:00:00+01:00
I have to parse this date to a python datetime object and for this I would like to use the datetime.strptime
method where I have to specify the format of the date but I don't know how to parse the timezone (+01:00) I tried with:
datetime.strptime(strDate, "%Y-%m-%dT%H:%M:%S%z")
but this does not work. Can you please tell me which format string I have to use?