How to get the epoch in Python?

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

asked Mar 17 by anonymous

1 Answer

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 Apr 20 by zma (380 points)

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...