Skip to content

Instantly share code, notes, and snippets.

@lloydsheng
Last active March 19, 2018 08:16
Show Gist options
  • Save lloydsheng/6850349 to your computer and use it in GitHub Desktop.
Save lloydsheng/6850349 to your computer and use it in GitHub Desktop.
python date to timestamp
import time
import datetime
now = datetime.datetime.now()
time.mktime(now.timetuple())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment