Python time Module
import timePython time.time()
import time
seconds = time.time()
print("Seconds since epoch =", seconds) Python time.ctime()
import time
# seconds passed since epoch
seconds = 1545925769.9618232
local_time = time.ctime(seconds)
print("Local time:", local_time) Python time.sleep()
time.struct_time Class
Python time.localtime()
Python time.gmtime()
Python time.mktime()
Python time.asctime()
Python time.strftime()
Python time.strptime()
Last updated