1、时间戳与日期互转
timestamp ->time
local t = 1508892464
function getTimeStamp(t)
return
os.date(
"%Y%m%d%H"
,t)
end
print(getTimeStamp(t))
time ->timestamp
os.time({year=2017,month=10,day=25, hour=16, minute=25, second=0})
1、时间戳与日期互转
timestamp ->time
local t = 1508892464
function getTimeStamp(t)
return
os.date(
"%Y%m%d%H"
,t)
end
print(getTimeStamp(t))
os.time({year=2017,month=10,day=25, hour=16, minute=25, second=0})