Skip to content

Instantly share code, notes, and snippets.

@okin
Created July 23, 2012 18:29
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 okin/3165258 to your computer and use it in GitHub Desktop.
Save okin/3165258 to your computer and use it in GitHub Desktop.
Parsing UTC + Offset with Python
#Package on pypi is: http://pypi.python.org/pypi/python-dateutil/2.1
from dateutil.parser import parse
#This is the value found somewhere
s = "20120629074518Z00'00'"
#This will give you a datetime to work with
dtime = parse(s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment