Skip to content

Instantly share code, notes, and snippets.

@diezguerra
Last active December 25, 2015 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diezguerra/6997711 to your computer and use it in GitHub Desktop.
Save diezguerra/6997711 to your computer and use it in GitHub Desktop.
import dateutil.parser
import pytz
date_string = '2013-10-14T12:47:12.776270'
date_object = pytz.timezone('America/Los_Angeles').localize(dateutil.parser.parse(date_string))
print date_object.isoformat()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment