I am trying to convert time-stamps of the format \"2012-07-24T23:14:29-07:00\" to datetime objects in python using strptime method. The problem is with the time offset at t
With python 3.5.2
To convert 26 Sep 2000 05:11:00 -0700
from datetime import datetime
dt_obj = datetime.strptime("26 Sep 2000 05:11:00 -0700", '%d %b %Y %H:%M:%S %z')
To convert 2012-07-24T23:14:29 -0700
dt_obj = datetime.strptime('2012-07-24T23:14:29 -0700', '%Y-%m-%dT%H:%M:%S %z')
Python 3.5.2 doesn't support -07:00 time offset ':' should be removed