The epoch is the point where the time starts. On January 1st of that year, at 0 hours, the “time since the epoch” is zero. For Unix, the epoch is 1970. To find out what the epoch is, look at gmtime(0).
Return the local date corresponding to the POSIX timestamp, such as is
returned by time.time(). This may raise ValueError, if the timestamp
is out of the range of values supported by the platform C localtime()
function. It’s common for this to be restricted to years from 1970
through 2038. Note that on non-POSIX systems that include leap seconds
in their notion of a timestamp, leap seconds are ignored by
fromtimestamp().
您可以使用
time.gmtime(0)
,它是epochTime Documentation
你可以试试-^{} 。根据documentation-
datetime.datetime.fromtimestamp(0)
它会给你:相关问题 更多 >
编程相关推荐