Skip to content

Instantly share code, notes, and snippets.

@dps
Created December 2, 2012 16:52
Show Gist options
  • Save dps/4189760 to your computer and use it in GitHub Desktop.
Save dps/4189760 to your computer and use it in GitHub Desktop.
Python code to convert seconds since epoch to ISO format (for kml, xml datetime etc)
dt = datetime.datetime.utcfromtimestamp(seconds_since_epoch)
iso_format = dt.isoformat() + 'Z'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment