How to get the seconds since epoch from the time + date output of gmtime()?

Use the time module:

import time    
epoch_time = int(time.time())

Leave a Comment