def to_datetime(datestring):
    time_tuple = parsedate_tz(datestring.strip())
dt = datetime(*time_tuple[:6])
return dt - timedelta(seconds=time_tuple[-1])
Going from twitter date to Python datetime date