Daylight Saving Time (DST)

General

// Definition

The practice of advancing clocks by one hour during warmer months and reverting them in autumn, creating two critical testing edge cases: the spring-forward transition, where one local hour does not exist, and the autumn fall-back, where one local hour occurs twice. Any system that stores, compares, schedules, or displays timestamps must be tested at these instants. Common failures include scheduled jobs skipping or running twice, timestamps stored in local time becoming ambiguous after fall-back, and duration calculations spanning a transition returning incorrect values. The safest approach is to store all timestamps in UTC and convert to local time only at display. Transition dates vary by region and change periodically by legislation — derive them programmatically rather than hardcoding.

// Related terms