📌  相关文章
📜  在 python 代码示例中添加小时到日期时间

📅  最后修改于: 2022-03-11 14:45:51.064000             🧑  作者: Mango

代码示例2
# import datetime module
from datetime import datetime,timedelta

currentTimeDate = date.today() + relativedelta(hours=5)
currentTime = currentTimeDate.strftime('%H:%M:%S')

print(currentTime)

// Run Example -> python example1.py

// Output:

05:00:00