Top all-time · #2901
Code of Matt
Personal blog · codeofmatt.comprogrammingother
Code of Matt is a personal blog at codeofmatt.com about programming. Since 2016, 25 different Hacker News readers have linked it 31 times, most often “List of 2024 Leap Day Bugs”. The last post was in 2024, but the archive is still widely read.
Too few sampled comments (16) to say how often HN recommends it.?
Why HN links it
HN readers link Code of Matt's posts on time zone changes, daylight saving surprises and leap-day bugs, usually as examples or sources for why storing UTC alone can break.
Summarised by Claude from a sample of 16 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
Adventures in programming, featuring Time Zones!
Most-linked posts?
- List of 2024 Leap Day Bugs9 people · 9 mentions · first linked 2024-02-29
- On the Timing of Time Zone Changes7 people · 7 mentions · first linked 2016-04-25
- /on-the-timing-of-time-zone-changes/2 people · 4 mentions · first linked 2019-03-28
- List of 2016 Leap Day Bugs2 people · 2 mentions · first linked 2016-02-29
What Hacker News says?
https://codeofmatt.com/on-the-timing-of-time-zone-changes/
Comment linking /on-the-timing-of-time-zone-changes/
on “US Senate votes unanimously to make daylight savings time permanent”Submitted 2020 Leap Day Bugs as a story · 312 points
HN discussionHere's a blog post that is tracking issues: https://codeofmatt.com/list-of-2024-leap-day-bugs/
Comment linking /list-of-2024-leap-day-bugs/
on “Ask HN: Did you encounter any leap year bugs today?”Submitted On the Timing of Time Zone Changes (2016) as a story · 25 points
HN discussionIn some cases, storing times in UTC opens you up to possible errors: https://codeofmatt.com/on-the-timing-of-time-zone-changes/ I think the right thing is to store times with the timezone the user wanted when they created the time. You can often use defaults or other UX niceties to streamline specifying TZ, but not always. Also, if you'll want to unambiguously know the timestamp's exact point in time at some point (…
Comment linking /on-the-timing-of-time-zone-changes/
on “Timezone Bullshit”Submitted Please don't call it Epoch Time as a story · 4 points
HN discussionIt can even become wrong for future dates. Always use UTC is a broken, bad rule for future dates, it only makes sense for things that have already happened. As for how it breaks, you have a booking for 8pm the day after the start of summer time. You stored the date/time in UTC. Government changes the start of summer time. Your database now thinks it's at 7pm because it uses UTC. Here's some examples: https://codeofm…
Comment linking /on-the-timing-of-time-zone-changes/
on “Temporal: Getting started with JavaScript's new date time API”Submitted List of 2024 Leap Day Bugs as a story · 3 points
HN discussion> Just store the time stamp and time zone separately and update the time stamp to reflect any changes to a time zone's offset Thus reinventing zoned datetimes badly > if that actually happens It happens literally all the time, sometimes with very little heads up e.g. the decision to apply DST or not can be take mere weeks before it actually occurs[0], and something as impactful as an entire calendar day disappearing…
Comment linking /time-zone-chaos-inevitable-in-egypt/
on “Glibc is still not Y2038 compliant by default”Submitted On the Timing of Time Zone Changes as a story · 3 points
HN discussionI should also clarify that conceptually, even if you keep your copy of the tzinfo database obsessively up-to-date, you could still experience what appear to be retroactive updates, per the "Theory and Pragmatics" document from the tzinfo project [1]. That's because some governments are pretty sloppy about announcing their timezone changes in advance. It's compounded by the tzinfo DB being maintained by volunteers (w…
Comment linking /on-the-timing-of-time-zone-changes/
on “Storing UTC is not a silver bullet”Submitted On the Timing of Time Zone Changes as a story · 3 points
HN discussionI just came across a note about Morocco, which entered daylight savings time in March 2016, but then left daylight-savings in June for 35 days , re-starting daylight-savings in July [1]. I've read that the explanation for this temporary suspension of daylight-savings is Ramadan [2], and Ramadan is dependent on the observed sighting of the new moon - so you can't necessarily predict the date in advance. I ended up co…
Comment linking /2016/04/23/on-the-timing-of-time-zone-changes/
on “Some DNS lookups causing 5xx errors due to leap second bug”Submitted List of 2016 Leap Day Bugs as a story · 3 points
HN discussionSometimes on quite short notice too. https://codeofmatt.com/on-the-timing-of-time-zone-changes
Comment linking /on-the-timing-of-time-zone-changes
on “All I want for Christmas is a negative leap second”Submitted List of 2024 Leap Day bugs as a story · 2 points
HN discussionDetails of the cancellation and the fallout effects can be found here: http://codeofmatt.com/2016/07/01/time-zone-chaos-inevitable-...
Comment linking /2016/07/01/time-zone-chaos-inevitable-in-egypt/
on “Egypt cancelled DST”Submitted List of 2024 Leap Day Bugs as a story · 2 points
HN discussionMore examples on http://codeofmatt.com/2016/04/23/on-the-timing-of-time-zone-... "Haiti canceled DST for at least the 2016 calendar year. It was scheduled to go into effect on March 13th, but on March 12th (just 1 day notice!) the government issued a press release canceling it."
Comment linking /2016/04/23/on-the-timing-of-time-zone-changes/
on “Egypt cancelled DST”Submitted List of 2024 Leap Day Bugs as a story · 2 points
HN discussionI don't think the London historical offset should be blamed for such errors, nor should New York's nor any other zone's historical, local mean time offsets. If the tzdb is being used in a buggy way, that's on the user - in this case, pytz. Virtually all systems use tzdb in some form but don't blindly take the earliest historical offsets in a common usage pattern. Fun fact: for many years the ECMAScript spec states e…
Comment linking /javascript-date-type-is-horribly-broken/
on “What the Royal Astronomical Society in 1884 Tells Us About Python Today”Submitted On the Timing of Time Zone Changes as a story · 2 points
HN discussionI disagree in cases like this, where local wall time is the source of truth. I would go further than OP and not keep UTC time around in a separate column either. Why? On March 13 last year, Chile announced a new daylight savings change, to take place on May 15. [1] Let's say I already had an appointment somewhere for 3:00pm on May 21. When the timezone change was announced, that reservation is still at 3:00pm local.…
Comment linking /2016/04/23/on-the-timing-of-time-zone-changes/
on “Time matters: when UTC time is just not enough”Submitted List of 2024 Leap Day Bugs as a story · 1 points
HN discussionPayment infrastructure? All of it? Some of it? Recently we had this: https://codeofmatt.com/list-of-2024-leap-day-bugs/ So a day for a grocery chain in Sweden and a gas station chain in New Zealand. For me "There is a 3 out of 4 chance of a damaging earthquake in the Bay Area in the next 30 years." From: https://www.earthquakeauthority.com/blog/2020/san-francisco-... Is this a week of no power (so no cc's, no atm, n…
Comment linking /list-of-2024-leap-day-bugs/
on “The Luddite's Guide to Defending Cash (2023)”Submitted List of 2024 Leap Day Bugs as a story · 1 points
HN discussionI was missing references to the time zone chaos in Egypt, so I looked it up. Apparently that started shortly after the article, but the same author also wrote about that. https://codeofmatt.com/2016/07/01/time-zone-chaos-inevitable...
Comment linking /2016/07/01/time-zone-chaos-inevitable-in-egypt/
on “On the Timing of Time Zone Changes (2016)”Submitted List of 2024 Leap Day Bugs as a story · 1 points
HN discussionLikely. See https://en.wikipedia.org/wiki/Leap_year_bug And https://codeofmatt.com/list-of-2020-leap-day-bugs/
Comment linking /list-of-2020-leap-day-bugs/
on “Ask HN: February 29th Software Bugs?”Submitted On the Timing of Time Zone Changes as a story · 1 points
HN discussion