Skip to content

Instantly share code, notes, and snippets.

@jmfrank63
Last active August 14, 2018 13:22
Show Gist options
  • Save jmfrank63/201b7171c1bb0064dda9ac5dd5d6f25e to your computer and use it in GitHub Desktop.
Save jmfrank63/201b7171c1bb0064dda9ac5dd5d6f25e to your computer and use it in GitHub Desktop.
Unixtime to printable string
import datetime
utime = '1534256362'
strdate = datetime.datetime.fromtimestamp(
int(utime)
).strftime('%Y-%m-%d %H:%M:%S')
print(strdate)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment