Skip to content

Instantly share code, notes, and snippets.

@saghul
Created February 1, 2011 00:08
Show Gist options
  • Save saghul/805117 to your computer and use it in GitHub Desktop.
Save saghul/805117 to your computer and use it in GitHub Desktop.
Example parsing timestamps with dateutil module
In [26]: timestamp = '2011-02-01 01:05:00+01:00'
In [27]: from dateutil.parser import parse as parse_datetime
In [28]: dt = parse_datetime(timestamp)
In [29]: print dt
-------> print(dt)
2011-02-01 01:05:00+01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment