📜  python代码示例中的时间加法

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

代码示例1
from datetime import timedelta, datetime

current_date_and_time = datetime.now()
new_time = current_date_and_time + timedelta(minutes=5, hours=1)
print(new_time)