time.gmtime([ sec ])
sec -- 這將被轉換成結構體 struct_time 來表示秒數。
#!/usr/bin/python3 import time print ("gmtime :", time.gmtime(1455508609.34375))
gmtime : time.struct_time(tm_year=2016, tm_mon=2, tm_mday=15, tm_hour=3, tm_min=56, tm_sec=49, tm_wday=0, tm_yday=46, tm_isdst=0)