0

i' ve a string i' d like to parse and create a datetime object from it. For example:

2013-07-09T11:21:32+0500

. Using

datetime.datetime.strptime(str(dt)[0:19], '%Y-%m-%dT%H:%M:%S')

will do the half of the work, but what can i do with the timezone information? How can combine it with datetime if this is in this form?

Thanks.

jfs
  • 399,953
  • 195
  • 994
  • 1,670
user2194805
  • 1,201
  • 1
  • 17
  • 35

0 Answers0