-
Notifications
You must be signed in to change notification settings - Fork 671
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
Timezone not properly read from config #2168
Comments
I was looking in other issues like #2150 and there the log was: [0d00h00m04s] 2023-03-08T19:48:23 [SNTP] TimeZone not set, using default: CET-1CEST,M3.5.0,M10.5.0/3 So i made the field Timezone empty but still checked and then my device kept on rebooting. [System] this will make the device unreachable... |
Now it is not set... the log shows: [0d00h00m04s] 2023-03-12T14:22:34 [SNTP] TimeServer: nl.pool.ntp.org Remark that now it logs the full CET-1CEST,M3.5.0,M10.5.0/3 instead of only CET-1CEST... |
The main problem is the config parser, it seems to split at the |
It then uses the default value which matches for Germany) I think I fixed it now, please test https://github.com/jomjol/AI-on-the-edge-device/actions?query=branch%3Afix-timezone-config-parser and let me know.
I can not reproduce this! |
I left the Timezone empty in the configuration. In the config.ini it had: [System] After that change it kept rebooting... the log is from the serial port: 16:05:04.809 -> I (3826) gpio: GPIO[25]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:2 |
Hmm, I cant see a correlation with your crash on the timezone. |
ok, I got it now, please check the next build. |
Thank you! |
In October, measurement data may then be overwritten or saved twice. Does the time zone CET or UTC standard time work correctly when parsing in version 14.0.3? If so, I'll make the switch to UTC+1 immediately. Switch setup to UTC+1, turn off ESP for an hour, then restart. TZ data string: UTC+1 This is not really important for the water meter, because perhaps no water is consumed during the time change. With gas and electricity meters, it is important to me that the data is saved correctly. I don't need summer / winter time when saving the measured values, UTC+1 is enough for me. Will this work in version 14.0.3? |
When using MQTT and Homeassistant, Homeassistant does not care about the devices time at all, it uses its own internal time. So the time overlapping due to the daylight saving time change must be handled there, although on a quick search I could not find out how they solve it. When writing directly to InfuxDB, I think it uses UTC (see #1991 (comment)), so there again it should not be an issue. |
As for your question regarding v14.0.3, please start switching to v15 as we are not going to do modification/fixing of older versions! |
As for your question regarding v14.0.3, please start switching to v15 as we are not going to do modification/fixing of older versions! I think the TZ string for UTC I need is UTC+1 or UTC+01:00:00. I understood that the comma was not processed correctly when parsing. But I don't need that for CET standard time. So it should work in V 14.0.3. I'll only switch to version 15.x.x in April, otherwise I'll get the switch to daylight saving time again. I want to avoid that. |
That is a valid point. |
Discussed in #2166
Originally posted by FastFrank March 12, 2023
The Problem
Timezone in Configuration:
CET-1CEST,M3.5.0,M10.5.0/3
Log from MQTT last night: (12-03-2023)
JSON gewijzigd in { "value": "18839.45", "raw": "18839.45", "pre": "18839.45", "error": "no error", "rate": "0.008000", "timestamp": "2023-03-12T03:04:41+0200" }
02:06:01 - 8 uur geleden
JSON gewijzigd in { "value": "18839.41", "raw": "18839.41", "pre": "18839.41", "error": "no error", "rate": "0.004000", "timestamp": "2023-03-12T01:59:41+0100" }
02:01:00 - 8 uur geleden
Version
15.0.3
Logfile
Expected Behavior
Change the +1:00 to +02:00 on Month 3 last week day 0
in the log:
[SNTP] Time zone set to CET-1CEST,M3.5.0,M10.5.0/3
instead of:
[SNTP] Time zone set to CET-1CEST
Screenshots
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: