How to get the epoch in Python?

In Python, how to get the epoch time (the number of seconds since epoch)?

In Python, you can get the epoch time by calling time.time():

import time

print time.time()

Reference: https://www.systutorials.com/dtivl/16/how-to-get-the-epoch-timestamp#answer-18

Answered by zma.

Leave a Reply

Your email address will not be published. Required fields are marked *