Created
September 26, 2022 13:11
-
-
Save cdecl/64ba876925fb25020ff9ebc1e72ed19f to your computer and use it in GitHub Desktop.
This file contains 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
import time | |
from datetime import datetime | |
tm = time.localtime(1648771200000 / 1000) | |
s = time.strftime('%Y-%m-%d %H:%M:%S', tm) | |
print(s) | |
r = time.strptime("2022-05-01 09:00:00", '%Y-%m-%d %H:%M:%S') | |
print(r) | |
mi = time.mktime(r) * 1000 | |
print(mi) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment