Skip to content

add localization to the time stamps #28

@dlarue

Description

@dlarue

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions