Created
September 23, 2016 01:11
-
-
Save honmaple/458fcf2abc5831cbcdb2ecd0de6cf29e to your computer and use it in GitHub Desktop.
得到当天零点时间
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
today = datetime.datetime.today() | |
b = datetime.datetime(today.year, today.month, today.day, 0, 0, 0) | |
print(b) | |
now = time.time() | |
midnight = now - (now % 86400) + time.timezone | |
itime = time.ctime(midnight) | |
print(itime) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment