By adding CONFIG["GW_TZOFFSET"] = "-8" for PST and crate a localtime function instead of gmtime using this offset times the 3600(num sec in 1 hour). Currently get error though.
local function localtime(t,us)
-- HOW TO DO THIS? rtctime.epoch2cal doesn't like my "fixed" epoch time
local lt = t + CONFIG["GW_TZOFFSET"] * 3600
local tm = rtctime.epoch2cal(lt)
return string.format('%04d-%02d-%02d %02d:%02d:%02d GMT',tm["year"],tm["mon"],tm["day"],tm["hour"],tm["min"],tm["sec"])
end
By adding CONFIG["GW_TZOFFSET"] = "-8" for PST and crate a localtime function instead of gmtime using this offset times the 3600(num sec in 1 hour). Currently get error though.
local function localtime(t,us)
-- HOW TO DO THIS? rtctime.epoch2cal doesn't like my "fixed" epoch time
local lt = t + CONFIG["GW_TZOFFSET"] * 3600
local tm = rtctime.epoch2cal(lt)
return string.format('%04d-%02d-%02d %02d:%02d:%02d GMT',tm["year"],tm["mon"],tm["day"],tm["hour"],tm["min"],tm["sec"])
end