python中mktime的问题?
PHPz
PHPz 2017-04-17 14:59:54
0
2
926
import time
t=time.strptime("1969-Sep-23 00:00:00",'%Y-%b-%d %H:%M:%S')
s=time.mktime(t)

错误提示:OverflowError:mktime argument out of range.

如果把时间改成1970-Sep-23 00:00:00 就不会出现错误。

为什么?

PHPz
PHPz

学习是最好的投资!

reply all(2)
大家讲道理

The timestamp starts from 1970, the earliest is 1970

迷茫

I did not report an error here, but returned a negative number. Related information: Linux x86_64, Python 2.7.9 & 3.4.3, glibc 2.21. You should also provide this information.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!