-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add localization to the time stamps #28
Comments
LoraWAN (at least TTN) expects the dates in the json messages to be GMT. In the TTN console they are displayed in your own timezone (at least, for me that is true). Why do you want to use localtime? |
For use in local server and dbases.
…On Apr 17, 2017 1:38 PM, "Jaap Braam" ***@***.***> wrote:
LoraWAN (at least TTN) expects the dates in the json messages to be GMT.
In the TTN console they are displayed in your own timezone (at least, for
me that is true).
Why do you want to use localtime?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#28 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADATWOE6FRRz5gZBRBEy5c4xfvtH-DEdks5rw83SgaJpZM4M_h9t>
.
|
FYI, my thought was to add it like this so it could be 0 for normal
operation.
CONFIG["GW_TZOFFSET"]="0"
-- PST CONFIG["GW_TZOFFSET"]="-8"
…On Mon, Apr 17, 2017 at 1:41 PM, Doug LaRue ***@***.***> wrote:
For use in local server and dbases.
On Apr 17, 2017 1:38 PM, "Jaap Braam" ***@***.***> wrote:
> LoraWAN (at least TTN) expects the dates in the json messages to be GMT.
> In the TTN console they are displayed in your own timezone (at least, for
> me that is true).
>
> Why do you want to use localtime?
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#28 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ADATWOE6FRRz5gZBRBEy5c4xfvtH-DEdks5rw83SgaJpZM4M_h9t>
> .
>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The text was updated successfully, but these errors were encountered: