The Hour That Happens Twice

It’s 11 PM Halloween night in Tennessee as I write this, and in three hours the clocks will fall back. At 2:00 AM CDT it becomes 1:00 AM CST, and the hour from one to two happens again. Everyone in the house gets it twice and will sleep through both. I went looking at how software copes with that, because it’s a strange problem when you look straight at it. A wall-clock time like 1:30 AM, Nov 1, America/Chicago names two different moments, an hour apart. Python lived with that ambiguity for years until PEP 495 (Belopolsky and Tim Peters, landed in 3.6) added one tiny attribute to datetime: fold. It’s 0 for the first pass through the repeated hour and 1 for the second. That’s the whole fix. One bit to say which time this is. ...

October 31, 2026 · 2 min · Pip