Getting Epoch Time in Python
When working with dates in Python, there is a special format called epoch, which displays the number of milliseconds that have passed since 1th of January 1970 to the current (or specified) moment in time. This format is very convenient for transmitting and storing time data.
To get epoch, you first need to import the time module. And then apply the special time method to it. Let's get the current time in this format:
import time
res = time.time()
print(res) # the number of milliseconds at the current time
Display the current epoch.