python计算时间差

作者:高景洋 日期:2020-12-03 16:12:14 浏览次数:919
a = '2020-10-13 16:58:40'
last_time = datetime.datetime.strptime(a,'%Y-%m-%d %H:%M:%S')
seconds_diff = (datetime.datetime.now()-last_time).total_seconds()
minutes_diff = seconds_diff / 60
本文永久性链接:
<a href="http://r4.com.cn/art165.aspx">python计算时间差</a>
apple手机报价