Self-pay gas station pumps break across NZ as software can’t handle Leap Day::“We’ll add it to our Outlook reminders…”
And THAT’S why you don’t roll your own datetime class/column format. It’s a solved problem, people!
It was millennia ago when I first read “don’t ship your own date/time library”. Guess these fellas somehow missed it.
(I did this thing a while ago, but hopefully it doesn’t count since it’s a joke library)
A decade ago Tom Scott was recorded for Computerphile with this hilarious an enlightening cautionary tale. Never, ever, write your own calendar code.
That was excellent, thank you.
Does your September library break on leap Septembers?
I honestly have no idea, it’s been a while since I wrote it.
Y2K finally happened.
kiWi2K
Hahah, this reminds me of that time (long ago) when a very old version of our software would also simply crash when attempting to use it on a leap day. When customers called in, all we could do was tell them to wait until tomorrow, and that the problem wouldn’t return for at least another four years.
Days you should book off as a developer:
Feb 29th. Clocks go forward day. Clocks go back day.
If you’ve done anything with dates or scheduling, these days will fuck it.
Jokes on you if you wrote the timeoff system
Someone forgot a case in their test suite.
I can’t imagine what logic would’ve hinged on February having 28 days. It’s not like 29 exceeds some maximum value for days in a month. Probably someone thought it was a good idea to write their own date-time library.
Next = (year+1, month, day)
Did they not have automatic pumps 4 years ago?
This was one company, with only their NZ code affected. It’d be astonishing if all the pumps in NZ were still using the same code as four years ago. And not at all astonishing that coders are still making careless errors to do with dates.