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.
Ask HN: Did you encounter any leap year bugs today?
421–430 of 498 posts
Re: Ask HN: Did you encounter any leap year bugs today?
#422Re: Ask HN: Did you encounter any leap year bugs today?
#423Re: Ask HN: Did you encounter any leap year bugs today?
#424We 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…
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.
Let me rephrase that: you can profit from it. Even if it's not good.
Re: Ask HN: Did you encounter any leap year bugs today?
#425Re: Ask HN: Did you encounter any leap year bugs today?
#426Laos issues 30-day tourist visas on arrival. We arrived on February first and I have a Laotian visa valid until February 30th, 2011.
Not a leap year bug but a February bug. Ended up being inconsequential, but still makes for a fun story.
Re: Ask HN: Did you encounter any leap year bugs today?
#427Earlier quoted context omitted.
More like 4… since you can go to vietnam at 17. You're thinking of the age to drink a beer.
Can't get drafted at 17. I don't know if you can go or not.
Re: Ask HN: Did you encounter any leap year bugs today?
#428Re: Ask HN: Did you encounter any leap year bugs today?
#429Earlier quoted context omitted.
> If you plug your query into https://platform.openai.com/tokenizer , you can see that"egregious" is a single token That says it's 3 tokens.
It doesn’t even matter how many tokens there is, because LLMs are completely ignorant about how their input is structured. They don’t see letters or syllables cause they have no “eyes”. The closest analogy with a human is that vocal-ish concepts just emerge in their mind without any visual representation. They can only “recall” how many “e”s are there, but cannot look and count.
Like a blind person?
Re: Ask HN: Did you encounter any leap year bugs today?
#430All street lamps in Paris turned off at midnight :) https://www.leparisien.fr/paris-75/paris-pourquoi-les-rues-d...
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.
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.