Created
January 30, 2018 11:18
-
-
Save devlights/78691cf5f4bcfe2b24224ef0eb7185e6 to your computer and use it in GitHub Desktop.
[python] 指定したUNIX時間を yyyy/mm/dd hh:mm:ss 形式で表示
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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