Closed jellewie closed 1 year ago
Should be fixed, but is untested, but ATM the time is right
Date 2021-04-10 (DST enabled) daylightOffset_sec = 3600 Current time = 13:22 (Right)
when daylightOffset_sec changed to 0 (and synctime is called), the offset is removed (12:22) as should.
So it seems that it does apply, but on the wrong date (like 1-2 weeks off)
The date applied is the US date
The Readme still must be updated to reflect the changes.
When updating it will see that's its invalid (either empty or its a number) and will change it to the default AMSTERDAM time. old values will be overwritten. The other value is skipped and marked as unused (Replaced with "")
Daylight saving time is not automatically applied and removed, although the offset time (3600) has been set.
The default ESP32 time library is used (if I'm not wrong) so who doesn't it do this? is there a config error (do we need to set dates, or enable it?) or is this really a bug?
https://github.com/jellewie/Arduino-Smart-light/blob/4e2bdca7e8c97ab514b5bf7a0a8bff4dde339aa7/Arduino/Clock.h#L112 https://www.cplusplus.com/reference/ctime/tm/ notes something about a 'tm_isdst' being set? https://www.cplusplus.com/reference/ctime/localtime/