python中时间字符串和秒数的相互转换
时间:2008-11-25 来源:zpp71
1)秒数 ===》字符串
|
from time import * |
2)字符串 ===》秒数
|
from time import * 先将时间字符串解析为9元组,例如: 2008-11-25 23:51:20,解析为9元组:[2008,11,25,23,51,20,0,0,0]。 >>> tmlist = [2008,11,25,23,51,20,0,0,0] >>> mktime(tmlist) 1227628280.0 |
相关阅读 更多 +
排行榜 更多 +









![《小朋友齐打交2复刻版》 v2.14d升级档+未加密补丁[TENOKE]](https://images.phpfans.net/img/f1/20251229/logo_69527f2a9daf81.jpg)
