Leap year software glitch closes fuel pumps across New Zealand (www.straitstimes.com)
from fne8w2ah@lemmy.world to world@lemmy.world on 29 Feb 2024 08:46
https://lemmy.world/post/12545090

#world

threaded - newest

narc0tic_bird@lemm.ee on 29 Feb 2024 09:27 collapse

Someone wrote their own date library.

Aurenkin@sh.itjust.works on 29 Feb 2024 13:18 next collapse

Never write your own date library

where_am_i@sh.itjust.works on 29 Feb 2024 17:31 next collapse

classic!

stoly@lemmy.world on 29 Feb 2024 19:30 next collapse

I was thinking to myself that this system MUST be less than 4 years old or it would have happened last February 29.

elmicha@feddit.de on 29 Feb 2024 23:18 collapse

I hit a similar bug today where I had used

SYSDATE - NUMTOYMINTERVAL(2, 'year')

in Oracle. I don’t remember why I didn’t use sysdate - 2*365 instead, which works without problems for my use case (I don’t care about one day more or less). But I would have appreciated if the compiler or the IDE would have yelled at me.