一、datetime模块
import datetime
print(datetime.datetime.now())
2019-03-07 16:22:14.544130
print(datetime.date.fromtimestamp(time.time()))
2019-03-07
print(datetime.datetime.now() + datetime.timedelta(3))
2019-03-10 16:22:14.560599
print(datetime.datetime.now() + datetime.timedelta(-3))
2019-03-04 16:22:14.568473
print(datetime.datetime.now() + datetime.timedelta(hours=3))
2019-03-07 19:22:14.575881
print(datetime.datetime.now() + datetime.timedelta(minutes=30))
2019-03-07 16:52:14.585432
c_time = datetime.datetime.now()
print(c_time.replace(minute=20, hour=5, second=13))
2019-03-07 05:20:13.595493