Readit News logoReadit News
Posted by u/sjr1 2 years ago
Ask HN: Did you encounter any leap year bugs today?
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.

kccqzy · 2 years ago
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 complaining that the users are too young to marry legally.
chaorace · 2 years ago
Haha, that would be quite the appropriate place to put one of those "Please wait and try again" error messages.
tedajax · 2 years ago
"look, today the math just doesn't work out, try tomorrow"
xattt · 2 years ago
How do leap day birthdays get handled in general? How is the right age iterated every year?
usr1106 · 2 years ago
Relevant question for driving, voting, marrying, drinking. I'd assume just the date is compared.

If you are born on 29th, on future 28th you are considered "too young", regardless whether a 29th exists or not. On future March 1st you are "old enough" again regardless.

If a 29th exists you are old enough already on that date. Drinking beer in Germany at 16, I guess in some countries at 20 could be relevant cases. For the more common minimum age of 18 for many things, the limit is reached always on March, 1st because a 29th cannot exist.

paulddraper · 2 years ago
Both Feb 28 and Mar 1 are commonly used to celebrate birthdays.

AFAIK there is no firm convention. Feb is more natural ("My birthday is in February"), Mar is more logical (the 60th days of the year).

DinaCoder99 · 2 years ago
Sadly, I can say from experience the American draft does not count the number of birthdays celebrated to figure out if you're eligible to serve.
ao98 · 2 years ago
The most common approach I’ve seen is to alias them to Mar 1st.
swasheck · 2 years ago
so … many bullets were dodged today
DANmode · 2 years ago
Opinionated devs are the best devs.

Tell us about your last marriage?, lol

peteradio · 2 years ago
It's a leap year miracle!
alphanumeric0 · 2 years ago
This is why you use a datetime library.

Dead Comment

pavon · 2 years ago
No, but some of our software writes data to rotating directories named after the date, and while doing some manual debugging on a test system, it started failing to create these directories the first time it rotated on Feb 29 UTC. Turns out it just happened to run out of disk space at that time, but I had myself convinced that it was a leap year bug for over an hour. :)
Imagenuity · 2 years ago
LOL, a good example of correlation does not equal causation.
markb5 · 2 years ago
It's not. There was no correlation at hand here - this was just a coincidence
tgtweak · 2 years ago
I have a friend who was born on Feb 29, and in Quebec your driver's license fees must be paid on or before your birthday or your license is effectively revoked (It's a convenient reminder). He was on his way to pay them on the 29th and got pulled over for having an expired license... after some awkward common confusion with the police they came to the conclusion that the license bureau moves your "reminder" birthday up by 1 day when the actual day is on Feb 29, instead of back to March 1st, so they don't miss out on 3 years of license payments for leap year birthday citizens.

The cop had never encountered this before (1/1460 chance of occurring * the odds of being pulled over on that day)

I don't think they ever patched this, so watch out if you're a leap day license fee procrastinator in Quebec!

redox99 · 2 years ago
Wouldn't the drivers license have the expiration date printed on it?
tgtweak · 2 years ago
It's not the license expiration date is just the annual date that you need to pay your license renewal fees on.
foxyv · 2 years ago
What if the expiration date doesn't exist? Does the license just never expire? Wouldn't that be funny?
xandrius · 2 years ago
I mean, they could have paid it any day before then, right?

I would have just gone on the 28th and be done with it.

badcppdev · 2 years ago
Let me tell you about this human trait called procrastination.... actually I just have to do something first
stevage · 2 years ago
Sure...if you knew about this bug in the system.
jewel · 2 years ago
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 mistake and sometimes corrects itself.

[0] https://chat.openai.com/share/37490c9f-81d6-499f-b491-116536...

esalman · 2 years ago
Blows my mind that people consider using ChatGPT for serious applications. I mean it's fine as a code autocorrect/autocomplete tool as in GitHub copilot. But it should not replace the code itself. You encounter a bug in the code, you fix it, you never encounter it again. But ChatGPT will repeat the same mistake sooner or later. That's not how we should engineer solution for critical problems.
Draiken · 2 years ago
As long as you add the "AI" keyword to the product/app/company and sell to people that don't understand how unreliable it is, you're good.

Let me rephrase that: you can profit from it. Even if it's not good.

makoto12 · 2 years ago
If you sandbox your connection to openAI correctly, then you can get the benefit of a llm without making your application look silly at the same time. Identifying the correct places in your business to use it is tricky, but imo it certainly makes sense in a lot of specific areas. Just not a catch all that can run your business for you
ativzzz · 2 years ago
It's great for prototyping and creating outlines/rough drafts or for creating rough summaries - you can build this into some features to help your customers speed up writing lots of text
lucumo · 2 years ago
If the cost-savings is worth it compared to the problems...

I mean, that's how we do it with humans. It's quite a common occurrence to keep a part of a business process human because automating it would we too expense due to edge cases.

Humans make mistakes and are expensive, but are also flexible and usually smartish. ChatGPT makes mistakes and is usually dumbish, but is also flexible and cheap.

Engineering is about picking the right trade-offs in your solution.

littlestymaar · 2 years ago
Wired: LLM are practically AGI

Tired: ChatGPT thinks February 29th isn't a valid date.

pquki4 · 2 years ago
My favorite prompt: asking "How many e's are there in the word egregious". Always says three (ChatGPT 3.5, 4, 4 turbo). When you ask it which three, it realizes its mistake and apologizes (or sometimes tells you where they are that is completely wrong). Looks like it just outputs gibberish for these things.
AlienRobot · 2 years ago
That's because it's trained on 2021 data. No February 29 back then!
pants2 · 2 years ago
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.
peteradio · 2 years ago
But akshually neither does my uncle Ned
lynx23 · 2 years ago
Saw the same via the API with gpt-4-0125-preview. IOW, even gpt-4 thinks 2024 is not a leap year.
fragmede · 2 years ago
baron816 · 2 years ago
ChatGPT thinks today is March 1. Go ahead and ask it what today’s date is.
huytersd · 2 years ago
> No, 2024 is not a leap year. Leap years are years divisible by 4, except for years that are divisible by 100 unless they are also divisible by 400. Therefore, the next leap year will be 2024.
s9df898r32h · 2 years ago
thats better then Mistral... it "thinks" it is March 15th 2023

"The current date is March 15, 2023. However, please note that as a large language model, my knowledge is based on the data I was trained on, which is up to 2021. Therefore, I cannot provide real-time information or updates on current events or dates. I recommend checking a reliable source such as a calendar or a trusted news website for the most accurate and up-to-date information."

vdfs · 2 years ago
It is March 1 in many places
cheapgeek · 2 years ago
It's UTC. Ask it what day was yesterday.
js2 · 2 years ago
As of 10 PM US/Eastern, ChatGPT 3.5 answers as follows for me:

> You: what is today's date?

> ChatGPT: Today's date is February 29, 2024. Please note that February 29 occurs only in leap years. If you have any more questions or if there's anything else I can help you with, feel free to ask!

floydianspiral · 2 years ago
openai actually in their platform for billing, etc shows that its actually march 1 as well.
KomoD · 2 years ago
Yes.

> During the morning on Thursday, no ICA store in Sweden could accept card payments. Instead, you had to use cash, Swish or pay via their app.

> The reason behind the problem was an internal problem in the payment systems at ICA as a result of an extra day in February, leap day.

ICA being the biggest grocery store chain in Sweden

guappa · 2 years ago
And people in sweden look at me weird when I say I keep some cash around.

At least it wasn't 3 days like when Coop's provider got hacked. They also handle our pay checks at work… makes me feel so safe :D

evanb · 2 years ago
Particularly odd since the Swedish calendar has had a lot of leap-day shenanigans, including a one-time Feb 30th.

https://en.wikipedia.org/wiki/List_of_non-standard_dates#Feb...

yanateras · 2 years ago
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.
chatmasta · 2 years ago
How often do you encounter challenges related to your birthday? Meaning, not just on the day of Feb 29, but any day of the year when you're trying to select your birth date or something like that. Do you ever find forms where the date is missing or the backend wont accept it?
yanateras · 2 years ago
Occasionally, but less often than one could imagine! About a dozen times in my life.

Whenever February 29 wasn’t present as an option, the frontend was at fault, so I could set the right <input> value in the inspector as a workaround.

Other times February 29 was present as an option, only to be saved as February 28. Never March 1, which I’d say would be more coherent.

codetiger · 2 years ago
Happy birthday to you! It’s a special day and We don’t get this chance to say this often. Enjoy your day
yanateras · 2 years ago
Thank you :3
bombcar · 2 years ago
Were you born on the day after Feb 28 or the day before Mar 1? ;)
jagged-chisel · 2 years ago
Yes
swader999 · 2 years ago
Happy birthday!
yanateras · 2 years ago
Thank you ^_~
seabass-labrax · 2 years ago
Stay, yanateres, stay! They have no legal claim! No shadow of a shame will fall upon thy name: stay, yanateres, stay!
Wowfunhappy · 2 years ago
...it occurs to me, when should those services congratulate you? Should it be on February 28 or March 1?
jedberg · 2 years ago
According to the government, Mar 1. Anything that is based on your birthday (driver's license, drinking, signing contracts, etc) all happen on March 1 if there is no Feb 29 that year.

Which makes sense since then it is "after" your birthday.

yanateras · 2 years ago
I’d say March 1! February 28 might be too early.
wolfendin · 2 years ago
365 days ago was March 1, 2023
mnw21cam · 2 years ago
At midnight in-between 28th February and 1st March.

Deleted Comment

FumblingBear · 2 years ago
This one is rather specific, but a game rhythm based Final Fantasy game called Theatrhythm Final Bar Line is simply not allowing people to play today because it has an internal system that awards prizes for specific days and they didn't handle the case of what to do when it's on a leap day. You can boot it up but can't actually play the game as a result.

Not working on the game or anything but found it moderately amusing as someone who owns the game!

brian-armstrong · 2 years ago
Yeah, this one was odd. I also ran into it.

https://gamerant.com/theatrhythm-final-fantasy-bar-line-not-...

addandsubtract · 2 years ago
That's why they had to release FF7R2 today. It was planned all along /s
fdgjgbdfhgb · 2 years ago
All street lamps in Paris turned off at midnight :)

https://www.leparisien.fr/paris-75/paris-pourquoi-les-rues-d...

Cyberdog · 2 years ago
The street lights use some sort of timer that's tracking dates? Don't they typically just use light sensors to know when to turn on? It seems to me that'd be a simpler solution and also provide light during solar eclipses, thick storms, etc.
anonymfus · 2 years ago
First, these systems generally predate invention of semiconductor light sensors.

Second, how much light you need is proportional to human activity, not only to darkness. At deep night artificial lighting should be minimal to save energy, minimise disturbance to nature and people's sleep, while during early morning when kids go to schools it should be maximal.

Third, you need a central control over street lights anyway because you need to implement blackouts during wartime.

iforgotpassword · 2 years ago
Why should we pick a simple solution like that? Is it the 90s or what? Only a complete clown would pick anything other than a network of zigbee relays controlled by an unmaintained node.js app written by an out-of-business contractor, pulling in sunrise/sunset data from an external API and syncing its local time via a homegrown NTP alternative.

I mean look at electric cars.

aussieguy1234 · 2 years ago
Finally, night time photography without the street light pollution.
blahedo · 2 years ago
Oh! The street lamps on my campus didn't come on tonight when it got dark—it didn't occur to me then but this could totally be why.
WarOnPrivacy · 2 years ago
Improved nighting is an awesome gift. I'm jealous.
alickz · 2 years ago
The City Without Lights