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

mac2022-06-30  26

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)

  

转载于:https://www.cnblogs.com/c-x-a/p/8471758.html

最新回复(0)