4

I am extracting a time stamp from JSON which I want to convert to EST and format in human readable form.

When I extract it from JSON, I get the following text: "2012-06-30T10:36:06-07:00"

How do I convert it to east coast time (+3 hours) and in proper format ("6-30-2012 1:36pm")?

Rangers4me
  • 177
  • 2
  • 9
  • Other answers that might help - in python http://stackoverflow.com/questions/466345/converting-string-into-datetime and in javascript http://stackoverflow.com/questions/2974496/jquery-javascript-convert-date-string-to-date – PhoebeB Jun 30 '12 at 20:10

1 Answers1

1

you could use the pyiso8601 package that does this exactly. It accepts tzinfo which you can use pytz library to get predefined timezones. [they have plenty of e.g.]

Saikiran Yerram
  • 2,994
  • 3
  • 17
  • 20