* Use mathieucarbou/MycilaNTP which make the same as the currenet code with further improvements
* Remove zones.json file as it is already included in the NTP library now
* Remove the "Timezone" property from config as we will only save the time zone name in future (instead of spec + name)
* When changing the time zone, the device local time will be updated immidiatly in the web ui
the configuration write guard is now required when the configuration
struct shall be mutated. the write guards locks multiple writers against
each other and also, more importantly, makes the writes synchronous to
the main loop. all code running in the main loop can now be sure that
(1) reads from the configuration struct are non-preemtive and (2) the
configuration struct as a whole is in a consistent state when reading
from it.
NOTE that acquiring a write guard from within the main loop's task will
immediately cause a deadlock and the watchdog will trigger a reset. if
writing from inside the main loop should ever become necessary, the
write guard must be updated to only lock the mutex but not wait for a
signal.
Sunrise and -set must recomputed if one of the following conditions is met:
* The date changed (based on the selected timezone)
* Location (Lat/Lon) changed
* Sunset type changed
So instead of calculating that every minute just do it on update via web interface or date change.
If a new config is uploaded, the DTU gets restarted. There is no need to initiate a recalculation in this case.
Time was off by one hour when using the sync button in the web UI.
tm_isdst = -1 means that mktime determines the DST flag based on the current timezone