import time, datetime
t1 = time.gmtime()
t2 = time.mktime(t1)
t3 = datetime.datetime.fromtimestamp(t2)
print(t0)
print(t1)
print(t2)
print(t3)
tt = time.time()
print(tt)
print(datetime.datetime.now())
print(datetime.datetime(1970, 1, 1) + datetime.timedelta(seconds=tt))
print(time.localtime())
Convert TimeDiff to total seconds