时间转换

unix时间戳转换为字符串格式,比如:

1502116974 => "2017-08-07 22:42:54"

示例代码:

时间字符串转换为unix时间戳,比如:

"2017-08-07 22:42:54" => 1502116974

示例代码:

https://github.com/mike-zhang/pyExamples/blob/master/timeDateRelate/strTime2Int.py

带cache的转换:

https://github.com/mike-zhang/pyExamples/blob/master/timeDateRelate/strTime2IntWithCache1.py