-
Notifications
You must be signed in to change notification settings - Fork 430
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
ESP32 SNTP sys.tz_spec weird result #595
Comments
May I suggest you go to the forum and search there ? I've answered this at the forum and even have working examples in Spanish |
Some questions:
Time inside C functions, and specially on mongoose can be complicated for begginers. I would suggest, @alnunez, that you make a sample app if you think that indeed, this is a bug on the code. Good luck! |
Here is the exact piece of code. A function that builds a message, including datetime. Timer.fmt() seems affected by tz_spec, because i tried different values, and all of them changed the time zone when printing timestamp. function buildMsgUl(){
} |
mJS is outside my expertise, I don't use it. That said, here's your reason https://unix.stackexchange.com/questions/104088/why-does-tz-utc-8-produce-dates-that-are-utc8 Basically the POSIX tz formats are 3 letters plus the offset. But the offset has to be on the opposite sign. Hence why |
Well after some more experimentation i found some discrepancies in tz for America/Bogota as follows: from: https://github.com/mamuesp/timezones "America/Bogota":"<-05>5" from: https://github.com/openwisp/netjsonconfig/blob/master/netjsonconfig/backends/openwrt/timezones.py "America/Bogota", "COT5" |
That's the answer i was looking for! thanks again! |
Hi
I'm working with an ESP32 with mongoose OS V2.19.1.
Added SNTP library and setup and tried tho configure time zone for AMERICA/BOGOTA adding the following line to mos.yml
Bogota Time is UTC-5, however, after rebooting and SNTP sync the time showed was Greenwich plus 5 hours!!. Just for curiosity, changed the line this time to:
Rebooted, and SNTP synced. Now the time is correct!. Does somebody experienced the same thing?
The text was updated successfully, but these errors were encountered: