According to the definition of Unix time, it measures the number of seconds that have elapsed since 00:00 UTC on January 1st 1970. However, when I run datetime.fromtimestamp(0) using python 3.8, I get 1970-01-01 01:00:00. Why is it 1AM and not 00:00?
发布评论
评论(2)
时带!!!
尝试以下操作:
这在UTC中获得了时期时间(+00:00)
Timezones!!!
Try this:
This gets the epoch time in UTC (+00:00)
引用
(强调我
的计算机在CET上运行吗?
Quoting the documentation of datetime.fromtimestamp
(Emphasis mine)
Is your computer running on CET?