python 判断文件的创建时间和当前时间的比较

import os
import time
import datetime

filePath=r"C:\pyweibo\cookies5673210223"
ctime=os.path.getctime(filePath)
create=datetime.datetime.fromtimestamp(ctime)+datetime.timedelta(days=+1)#日期加1
nowdate=datetime.datetime.now()
print(create)

  

posted @ 2018-02-26 10:14  公众号python学习开发  阅读(909)  评论(0编辑  收藏  举报