In Python, how to get the epoch timestamp, the number of seconds passed since the epoch?
在Python中 ,如何获取纪元时间戳,即自纪元以来经过的秒数?
In Python:
在Python中 :
You can get the epoch time by calling time.time()
:
您可以通过调用time.time()
获得纪元时间:
import timeprint time.time()
Answered by dtivl.
dtivl回答。
翻译自: https://www.systutorials.com/how-to-get-the-epoch-timestamp-in-python/