1
tidewind 2015-03-18 16:31:53 +08:00
统统都是时间戳
def str2timestamp(datetime_str,format="%Y-%m-%d %H:%M"): """ 转换字符串时间到时间戳. """ timeArray = time.strptime(datetime_str, format) return time.mktime(timeArray) |
2
wwek 2015-03-19 08:57:40 +08:00
全用时间戳
|