Lurker News
After a frantic scramble this morning, our billing team has finished patching a bug which erroneously was charging our monthly subscribers for an extra day.

All test suites are passing now, and SRE has scheduled a postmortem after the QA confirms the fix in 2028.

Comments (481) 159 threads

Earlier comments
projectileboy#
“Anyone who thinks programming dates and times is easy probably hasn’t done much of it.” - Peter van der Linden, Expert C Programming
2muchcoffeeman2 replies#
Why are there so many stories about leap year bugs?
ImaCake1 reply#
Because programmers take shortcuts. Its easier to type x - 365 than to import Calendar and then date(x) - timedelta(1 year).
dimaaan#
And standard library design errors also.

Properly designed date/time API invented relatively recently.
System.DateTime (.NET) - 2002 | System.DateTimeOffset - 2005
Joda time (JVM) - 2005 | java.time - 2014
Temporal (JavaScript) - still experimental

bombcar1 reply#
It’s strange to me, it hasn’t been than long since a leap year and I don’t remember as many last time.
bhpm#
It’s the first go-around for the jr devs who went to school during the pandemic :)
chompas#
I was doing an online check in with the national Argentinian airline. My wife’s and I data was already in the system from the previous checkin. When we were about to confirm we noticed that both of our birthdates where off by one day earlier. I can’t confirm it was related to the leap year but I also cant find another explanation.
tr33house#
I had a few [datetime].replace(year=[current year]+n) in python where n is not divisble by 4 e.g. 2,10

This is in code we use for scheduling

Load more comments