Skip to content

Instantly share code, notes, and snippets.

@cubicdaiya
Created August 14, 2014 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cubicdaiya/e7e76a467d4e3f24e233 to your computer and use it in GitHub Desktop.
Save cubicdaiya/e7e76a467d4e3f24e233 to your computer and use it in GitHub Desktop.
epoch2datetime
ts_epoch = time.time()
ts = datetime.datetime.fromtimestamp(ts_epoch).strftime('%Y-%m-%d %H:%M:%S')
print ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment