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 就不会出现错误。
为什么?
学习是最好的投资!
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.
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.