- import datetime
- #now为现在的准确时间
- now=datetime.datetime.today()
- #future为未来的准确时间点
- future=now.replace(year=2015,day=1,month=1,hour=12,minute=51,second=50)
- delta=future-now
- print (delta)
- #该片段来自于http://www.codesnippet.cn/detail/021220137654.html
来源: http://www.codesnippet.cn/detail/021220137654.html