Live data from Hacker News

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

news.ycombinator.com

251–260 of 498 posts

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

#251

Earlier quoted context omitted.

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?

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 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.

> more coherent

depends on what you're trying to organize by. maybe 'birth month' is an important signifier.

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

#252

Earlier quoted context omitted.

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

365 days ago was March 1, 2023

This year has 366 days, or at least it does after Feb 29.

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

#253
post #92

My sister is staying in a hotel and all the keycards stopped working.

What happens in a situation like this? Does the staff issue physical keys? Do the doors even have manual locks? Do the staff walk every body to their room?

About a year ago I stayed in a hotel and the door lock started misbehaving one morning while I was at breakfast. Went to the front desk, got a new card, went back to the room and discovered it still didn't work. After doing that two more times, someone was sent up to the room with a mysterious, palm-sized device with a USB cable hanging off it, which they plugged into a well hidden USB port on the bottom of the lock. The device performed some black magic, and after about 30 seconds a light on the lock changed colour from orange to red and it started functioning correctly again.

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

#254
post #118

Earlier quoted context omitted.

For the survalence records Telling base where, and when, you were

Shouldn't that just be a unix timestamp or something? You'd think resolving that to a date time could be done in the UI instead of in the business logic

Unix time has discrepancies whenever leap seconds occur (several times in my career aquiring geophysical data).

If you're measuring | controlling objects in the physical world (cars, rockets, etc) then you should not use unix time - those glitches will happen and instantaneous computations will go kooky.

https://en.wikipedia.org/wiki/Unix_time#Leap_seconds

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

#255

Earlier quoted context omitted.

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 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.

> more coherent depends on what you're trying to organize by. maybe 'birth month' is an important signifier.

Here’s why:

* I was N years old on February 28th this year

* I will be N+1 years old on March 1st this year

Therefore:

* I was N-1 years old on February 28th last year

* I was N years old on March 1st last year

Perhaps the month is February and the non-leap year date is March 1st...

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

#256

Earlier quoted context omitted.

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?

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 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.

If it makes you feel better.... On February 29, 2008 I was working on a system as a government contractor. Part of it was outsourced to a sub-contractor who decided to write their own date/time library because how hard could that be (which I only learned about later)? For some reason NOTHING would work right that day. Took me longer than I'd care to admit of staring at the logs to realize that some started with March 1 2008....

edit: also happy birthday!

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

#258

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.

Happy birthday to you! It’s a special day and We don’t get this chance to say this often. Enjoy your day

Thank you :3

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

#259
post #91

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.

Were you born on the day after Feb 28 or the day before Mar 1? ;)

Yes
Post reply on HN