-
Notifications
You must be signed in to change notification settings - Fork 121
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
Various Time zone fixes #569
Conversation
- Set the default time zone to the defined one - skip `|` when setting the env var, stops the timezone from being recognised
…et the time on the EVSE.
One should push a new release after this merge. 4.1.7 has too much problems. This was the last urgent one to fix. |
previously one was returning local and the other GMT. Now they both return GMT Fixes #467
now this fix #467 question: are we agree that when setting time to manual mode, the timezone should be set to UTC0 ? |
At the moment it forces UTC in the code, so it doesn't matter what time zone you send. I am going to look at setting the time zone for manual set times as the DST info from the timezone is handy. Also need to figure out how to handle a different timezone of the EVSE and the browser. The ESP now sends the local and GMT times (according to the ESP) but this is then displayed in the timezone of the browser by default. Not sure if that is much of an issue other than for testing. |
strage, because if i send to /settime |
corrected I sent it wrong, but same problem: ntp: false gives: should gives edit: seems better to keep the tz in the setting for the manual mode to be consistant , in current UI, I force tz to UTC, and send the localtime as it is UTC time + store the previous tz setting in local storage to restore it if going back to ntp. but that's a bit hacky. Example above tries to just send correct time |
Yeah, I think I need to update it to properly handle timezones for manual mode.... :) https://youtu.be/-5wpm-gesOY |
ahahah that's insane reality we have to deal with :))) |
Can it be merged yet? Even if you change the manual tz later, it already works ok |
This also includes some large rework of code to ensure the `config_version` if properly set, and also added the ability to use JSON to set the time to be inline with the other APIs.
- Correctly block none UTC times, may support in the furture, but for now just set the UTC time + time zone - `sntp_enable` -> `sntp_enabled` to match config endpoint
- mktime returns the time in local time, but the incomming time is UTC, so we have to hack around with the configured time zone. No implementation on timegm on the ESP32 toolchain. - `time_format_time` can now return the GMT time as well as local time - Fixed parsing of time zone on the legacy API - Yet more tests
Fixes #349 reading the time back from the EVSE
Found many more timezone bugs, and fixed most of them, but this is still WIP |
I think the main task left is to work out how to set the time manually in the EVSE's timezone |
I've updated the UI2 for new /limit. Works ok now for manual without tricking to UTC. Will push on master when you are ready to merge. |
This all seems to be working now |
all good here. Thanks for this |
@glynhudson can you merge this one ? |
|
when setting the env var, stops the timezone from being recognisedFixes #107