Created
June 10, 2022 06:25
-
-
Save feiandxs/61a6a04d64309c452a7457938a899db9 to your computer and use it in GitHub Desktop.
+8小时
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
''' | |
Date: 2022-06-01 15:25:41 | |
LastEditors: ibegyourpardon | |
LastEditTime: 2022-06-01 15:29:35 | |
FilePath: /undefined/Users/feiandxs/Downloads/8.py | |
''' | |
import datetime | |
eta_temp = '2022-06-01 13:15:02' | |
fd = datetime.datetime.strptime(eta_temp, "%Y-%m-%d %H:%M:%S") | |
# 加8后的时间 | |
eta = (fd + datetime.timedelta(hours=8)).strftime("%Y-%m-%d %H:%M:%S") | |
print(eta) | |
def plus_8_hour(fd): | |
eta = (fd + datetime.timedelta(hours=8)).strftime("%Y-%m-%d %H:%M:%S") | |
return eta |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment