Skip to content

Instantly share code, notes, and snippets.

@zhangchunlin
Last active February 16, 2017 07:31
Show Gist options
  • Save zhangchunlin/f5e7997fdb6133fafa02fddd273e4b8b to your computer and use it in GitHub Desktop.
Save zhangchunlin/f5e7997fdb6133fafa02fddd273e4b8b to your computer and use it in GitHub Desktop.
time and strftime
import time
tstr = time.strftime("%Y-%m-%d %H:%M:%S",time.localtime(time.time()))
print tstr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment