Live data from Hacker News

Ask HN: Did you encounter any leap year bugs today?

news.ycombinator.com

171–180 of 498 posts

Re: Ask HN: Did you encounter any leap year bugs today?

#171

Our Sophos anti-virus at work blocked access to every website this morning because of the leap year, had to disable the web filtering to get us back up and running.

Yeah, so many "untrusted website" screenshots in the office chat. Half a productive day for staff in Australia

Re: Ask HN: Did you encounter any leap year bugs today?

#174

Our credit card invoice system shifted all invoices that were due 28th to the 29th of February. Still trying to figure out what happened.

Are they monthly invoices? Most billing systems will bill monthly recurring bills that have an anniversary of 28, 29, 30, or 31 on Feb 28. Maybe your system was actually doing the right thing and putting only 29, 30, and 31 on Feb 29.

Yes! It's anniversary based. What went wrong actually was the notification part. As Feb 29 was not an expected anniversary, it didn't schedule any notification to be sent.

Re: Ask HN: Did you encounter any leap year bugs today?

#175
post #74

I certainly did. There is a batch process to cull old records. It checks for customers who do not have a date of death recorded but are > 130 years old, as it assumes that we weren't informed of their death. It takes 130 years from the current date and uses that in an SQL statement to compares it to the date of birth. DB2 doesn't like 1894-02-29. Apparently it happens every 4 years, but no-one can be bothered to fix…

A simple fix would be to change it to a multiple of 4 (e.g. 124 years). Then it would fail every 100 years.

2000 was a leap year so it would not fail in 2100. But it would indeed fail in 2200/2300/2400 as 2100/2200/2300 are not leap years.

Re: Ask HN: Did you encounter any leap year bugs today?

#176

The other way around! Today a few services that don't congratulate me on my birthday (on non-leap years) did. I was born on February 29th.

...it occurs to me, when should those services congratulate you? Should it be on February 28 or March 1?

I’d say March 1! February 28 might be too early.

Re: Ask HN: Did you encounter any leap year bugs today?

#177

One thing I have learned from HN is that datetime issues are hard, prolific, programming language agnostic, and not to trust myself to get the logic right. (The same applies to floats.)

just like you don't roll your own crypto, you don't roll your own date libraries.

Re: Ask HN: Did you encounter any leap year bugs today?

#179
post #23

Heard from a friend in China: the age calculation portion of the app to schedule a marriage certificate had a bug where they subtracted 22 (legal minimum age) from the year, which resulted in 2002-02-29 which doesn't exist. The app intends to compare this against the user's birth date. The error handling code assumes all errors are from the comparison. The app then rejected all marriage certificate appointments by co…

so … many bullets were dodged today

Re: Ask HN: Did you encounter any leap year bugs today?

#180
post #103

We have a product that uses ChatGPT via the API, using the 3.5 turbo version. Our query involves some dates. Instead of giving back text like it usually does, today it has been giving errors because it does not think 2024-02-29 is a valid date. This is easy to reproduce with the web interface, at least sometimes [0]. It start out by saying it's not a valid date and then as it's explaining why it isn't it realizes its…

Wired: LLM are practically AGI Tired: ChatGPT thinks February 29th isn't a valid date.

For the record, both ChatGPT-4 and Gemini Ultra affirmed that it's a valid date. Gemini reasoned through it and GPT-4 ran python code to make sure 2024 was divisible by 4.
Post reply on HN