Urgent.News

One page, thousands of outlets. See who else covered it.

Editions

Tech

"One day later" and "24 hours later" are different quantities — the batch job that drifts an hour every spring

The code didn't change. The schedule did. There's a batch job on a US East Coast server that runs every morning at 9:00. It has been running fine for months — until the second Sunday of March, when it quietly starts running at 10:00 every morning. Nobody deployed anything. The cause usually looks like this: next = prev + 24 * 60 * 60 * 1000; // "one day later" The US East Coast switches to…

On the day following the change to daylight saving time, a batch job that runs daily at 9:00 started running one hour later. The issue arose because the code treated "one day" as both a civil day and 24 hours, while the actual clock difference is 23 hours due to the time jump. This discrepancy caused the batch job to execute at 10:00 instead of the intended 9:00 on the transition day.

The problem stems from mixing civil time and elapsed time within the same expression, which is not allowed in the Kairos schedule definition language used. Kairos addresses this issue by separating the two quantities at the literal level, with 1d representing a civil day and 24h representing elapsed time. The language rejects mixed widths at parse time, preventing the bug from occurring.

Additionally, the language ensures that nonexistent times, such as the 02:30 gap during daylight saving time transitions, cannot be represented as data, preventing silent errors.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

The Hoax Lifecycle in a Courtroom: COPA v Wright as a Live Specimen

The claim was about the invention of digital scarcity. The disproof was about kerning. There is a document in the record of an English lawsuit where the date is wrong in a way no human would ever…

  • Craig Steven Wright claimed to be Satoshi Nakamoto, creator of Bitcoin
  • Court case COPA v Wright concluded Wright is not Satoshi Nakamoto
  • Thirty-two of forty-seven presented documents found unreliable

The Verge Guide to Pets

Ah, the relationship between animals and the technology they can’t quite understand. Today, it seems like there’s a high-tech solution to every element of pet ownership, with devices on the market…

More from Tuesday 18 August →