local Y = string.sub(date , 1, 4)
local m = string.sub(date , 5, 6)
local d = string.sub(date , 7, 8)
local H = string.sub(time , 1, 2)
local M = string.sub(time , 3, 4)
local S = string.sub(time , 5, 6)
return os.time({ year=Y, month=m, day=d,hour=H,min=M,sec=S})
end
local function string2time( date,time ) --date: YYYYmmdd time: HH:MM:SS
local Y = string.sub(date , 1, 4)
local m = string.sub(date , 5, 6)
local d = string.sub(date , 7, 8)
local H = string.sub(time , 1, 2)
local M = string.sub(time , 4, 5)
local S = string.sub(time , 7, 8)
return os.time({ year=Y, month=m, day=d,hour=H,min=M,sec=S})
end