Pixelix icon indicating copy to clipboard operation
Pixelix copied to clipboard

Automatic DST switching

Open flcu opened this issue 4 years ago • 4 comments

In order to be able to leave the clock running 24x7x365 without any maintenance, I suggest to implement automatic DST detection and switching.

Several options exist:

  • Using an external service

  • Reimplement: Putting a timezone JSON on the clock and allow selection of current TZ

  • Using a library to implement the switch

  • ?

  • Check once an hour if DST has changed

flcu avatar Mar 28 '21 08:03 flcu

Will have a look what's the best here. I know that e.g. https://github.com/nayarsystems/posix_tz_db provides a json file with all necessary data, which could be used via configTzTime() in the ClockDrv module.

BlueAndi avatar Mar 28 '21 20:03 BlueAndi

Implemented the possibility to use the POSIX timezone string. Currently there is no drop-down where to choose the timezone, but may come in the future. Currently the settings are generic, without exceptions in the corresponding HTML code. Have to think about how to integrate it there.

BlueAndi avatar Mar 29 '21 21:03 BlueAndi

Unfortunately the usage of timezone strings causes now in the SunrisePlugin a problem with the conversion from gmt to localtime. The problem is in the newlib, where localtime() is located. Issue opened: https://github.com/espressif/newlib-esp32/issues/8

BlueAndi avatar Apr 21 '21 20:04 BlueAndi

Fixed in https://github.com/espressif/crosstool-NG/releases/tag/esp-2022r1-RC1

BlueAndi avatar Jun 20 '22 21:06 BlueAndi