Why batch jobs drift an hour every spring: civil days vs. elapsed time explained
A common scheduling bug causes batch jobs to drift by one hour each spring when daylight saving time begins on the US East Coast. The root cause is a subtle but important distinction: adding 86,400 seconds (24 elapsed hours) is not the same as advancing one calendar day, which can be 23 or 25 hours long during DST transitions. A scheduling language called Kairos addresses this by treating '1d' and '24h' as distinct, incompatible unit types, preventing developers from silently mixing the two. The language also raises explicit errors when a scheduled time falls into the DST gap, such as 02:30 on a clock-change morning, rather than silently shifting the time forward. The article argues that the core issue is linguistic ambiguity: the phrase 'one day' carries two valid but different meanings depending on whether wall-clock or elapsed time is intended.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in