Skip to content

DST

Choose a tag to compare

@amitfin amitfin released this 08 Feb 16:02

This release adds robust handling for edge cases caused by local timezone transitions during daylight saving time (DST):

  1. Forward gaps (non-existent local times): When a state transition (toggle) falls into a missing local time, it is automatically advanced to the next valid local time. For example, when DST starts the clock may jump from 01:59 to 03:00. If a toggle should be at 02:30, it will be adjusted to 03:00.
  2. Fall-back ambiguity (repeated local times): When a toggle occurs during a repeated hour, it can appear twice with different fold values and adjusted time. For example, when DST ends the hour from 01:00 to 01:59 occurs twice. If the schedule defines a single range from 00:30 to 01:30 and the current time is 00:00, the next four toggles will be:
    1. 00:30 (on, fold=0)
    2. 01:30 (off, fold=0)
    3. 01:00 (on, fold=1) << the time jumped back to 01:00 which is inside the schedule's range
    4. 01:30 (off, fold=1)

Full Changelog: v2.4.2...2.5.0