标签:pre date mes alt 技术 utc 作业1 class strftime
>>> from datetime import timedelta >>> now + timedelta(hours=72) datetime.datetime(2017, 10, 13, 10, 32, 10, 651001) >>> datetime.strptime(‘2017年10月9日星期一9时10分0秒 UTC+8:00‘,‘%Y年%m月%d日星期一%H时%M分%S秒 UTC+8:00‘).timestamp() 1507511400.0 >>> now-timedelta(days=100) datetime.datetime(2017, 7, 2, 10, 32, 10, 651001) >>> datetime(2018,1,1)-now datetime.timedelta(82, 48469, 348999) >>> datetime.now()-timedelta(days=100) datetime.datetime(2017, 7, 2, 11, 37, 41, 439001) >>> datetime(2018,1,1)-datetime.now() datetime.timedelta(82, 44507, 898999) >>> datetime.now()-timedelta(days=100)).strftime(‘%Y-%m-%d‘)
标签:pre date mes alt 技术 utc 作业1 class strftime
原文地址:http://www.cnblogs.com/1244581939cls/p/7644802.html