-
Notifications
You must be signed in to change notification settings - Fork 425
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
Refine Timezones #296
Comments
Hmm, this sounds completely not intentional, on the other hand I remember debugging a Browser issue, I might be forgot to revert code after testing. Good finding, I will check it. Thanks |
ok! thought it was me. Thanks and let me know if I can help out with testing or coding. |
Looking at the code again the timezone is taken from the browser (in the JS) so you don't really need to explicitly set a timezone. I think the whole section in the html and config can be removed. Do you agree? |
Internally, time is being tracked as Unix Time which is then adjusted to User's timezone on Web UI. You need to set timezone in order to list entries in the log correctly. |
Yes, time from NTP is in UTC and when viewed in the event log it's adjusted on the fly to the web browsers's timezone with the code:
So you don't need to explicitly set a timezone. In fact it's not even used anywhere in the code so can be removed from the web interface and config file. |
You are right for the frontend, on firmware level timezone setting is used. Line 23 in 162a7ff
|
yes it's set in However if you do want to convert the UTC to the correct timezone and handle DST (daylight saving times) in the firmware, I have extended the NTP code to use this library which works. But now I'm thinking its not really necessary since the only time the Date is ever displayed is in the web interface and JavaScript can do the real-time conversions quite nicely. |
Oh, now I understand, sorry for the inconvenience. I just need to refactor these functions and libraries. |
Fixed by #604 |
The timezone pull-down selection doesn't work for me so I started to look into the code. The timezone selected from the Web UI and stored in the SPIFFS config file is never used in the code, so device time will always be 1 hour + UTC. Is this intentional or is the implementation not finished?
The text was updated successfully, but these errors were encountered: