Skip to content

Instantly share code, notes, and snippets.

@devlights
Created January 30, 2018 11:18
Show Gist options
  • Select an option

  • Save devlights/78691cf5f4bcfe2b24224ef0eb7185e6 to your computer and use it in GitHub Desktop.

Select an option

Save devlights/78691cf5f4bcfe2b24224ef0eb7185e6 to your computer and use it in GitHub Desktop.
[python] 指定したUNIX時間を yyyy/mm/dd hh:mm:ss 形式で表示
def pt(secs=None):
import time
s = secs if secs else time.time()
t = time.localtime(s)
return time.strftime('%Y/%m/%d %H:%M:%S', t)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment