Skip to content

Instantly share code, notes, and snippets.

@zvineyard
Created June 19, 2012 05:16
Show Gist options
  • Save zvineyard/2952417 to your computer and use it in GitHub Desktop.
Save zvineyard/2952417 to your computer and use it in GitHub Desktop.
Python: Get Unix Timestamp
import time
int(time.mktime(time.strptime('2000-01-01 12:34:00', '%Y-%m-%d %H:%M:%S'))) #formats must match
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment