Skip to content

Instantly share code, notes, and snippets.

@avishekrk
Created August 13, 2016 15:09
Show Gist options
  • Save avishekrk/a0ac23c0b7a0ccef1f89e6e6ed9b5501 to your computer and use it in GitHub Desktop.
Save avishekrk/a0ac23c0b7a0ccef1f89e6e6ed9b5501 to your computer and use it in GitHub Desktop.
import time
time.time()
timestamp = time.time()
import datetime
print datetime.datetime.fromtimestamp(timestamp).strftime('%Y-%m-%d %H:%M:%S')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment