小编Yao*_*Min的帖子

时间戳的最大值

我在Windows 10 x64上使用Python 3.6.0。

我刚刚发现在中time.ctime(seconds)seconds参数具有一个隐式最大值,即32536799999,几乎等于2^34.92135

那是最大值吗?

错误消息只是说这是一个无效的数字。

>>> import time
>>> time.ctime(32536799999)
>>> 'Mon Jan 19 15:59:59 3001'
>>> time.ctime(32536799999+1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 22] Invalid argument
Run Code Online (Sandbox Code Playgroud)

我用Google搜索并查看了Python文档,但没有找到任何有关它的信息。我将在实验室中的Ubuntu上检查此问题。

python windows time

7
推荐指数
1
解决办法
2749
查看次数

标签 统计

python ×1

time ×1

windows ×1