5 ms·
> A number of New Zealand petrol pumps stopped working on Thursday due to a "leap year glitch" in payment software, fuel stations and the payment service provid
by amatix 3y ago
> A number of New Zealand petrol pumps stopped working on Thursday due to a "leap year glitch" in payment software, fuel stations and the payment service provider said.
https://www.reuters.com/world/asia-pacific/leap-year-glitch-shuts-some-new-zealand-fuel-pumps-2024-02-29/ https://www.reuters.com/world/asia-pacific/leap-year-glitch-...
- PlunderBunny 3y agoI'm sure it's more complicated than "we didn't think about leap years", but it certainly sounds pretty amateurish. Old programmer rant: In my day, we fixed the Y2K bug - we went to the future and back several times a day!
- kevin_thibedeau 3y agoIn your day people weren't doing everything with string ops in JavaScript.
- PlunderBunny 3y agoOh, the progress we've made!
- mustntmumble 3y agoIt does sound amateurish eh? I do most of my business logic inside Microsoft SQL Server Stored Procedure, and MS SQL just takes care of date pretty well. But then, come to think of it, you don't need to use SQL to have good date logic. C# and Java both have excellent date handing libraries. I don't know about C++, but I'd be surprised if there was not a modern date library for C++, so I am of the opinion there should be no excuses for software not to work on the 29th of Feb.
- SoftTalker 3y agoYes if you're writing your own date/time routines, dealing with dates as seconds since epoch, or anything like that you're going to get burned. Use date handling functions and libraries that have been developed by people who know how to do it and have been battle tested.
- throwaway2037 3y ago> but I'd be surprised if there was not a modern date library for C++ The standard library now includes <chrono>. AFAIK: It was mostly written by Howard Hinnant. He now has more date/time libs that expand upon <chrono>: https://github.com/HowardHinnant/date https://github.com/HowardHinnant/date
- deleted 3y ago[deleted]
- deleted 3y ago[deleted]
- dang 3y agoRelated ongoing thread: Self-pay gas station pumps break across NZ as software can't handle Leap Day - https://news.ycombinator.com/item?id=39553755 https://news.ycombinator.com/item?id=39553755 - Feb 2024 (31 comments)