@fne8w2ah@lemmy.world to World News@lemmy.worldEnglish • 1 year agoLeap year software glitch closes fuel pumps across New Zealandwww.straitstimes.comexternal-linkmessage-square5fedilinkarrow-up195cross-posted to: technology@lemmy.world
arrow-up195external-linkLeap year software glitch closes fuel pumps across New Zealandwww.straitstimes.com@fne8w2ah@lemmy.world to World News@lemmy.worldEnglish • 1 year agomessage-square5fedilinkcross-posted to: technology@lemmy.world
minus-square@narc0tic_bird@lemm.eelinkfedilinkEnglish40•1 year agoSomeone wrote their own date library.
minus-square@Aurenkin@sh.itjust.workslinkfedilinkEnglish15•1 year agoNever write your own date library
minus-square@stoly@lemmy.worldlinkfedilinkEnglish5•1 year agoI was thinking to myself that this system MUST be less than 4 years old or it would have happened last February 29.
minus-squareelmichalinkfedilinkEnglish3•1 year agoI 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.
Someone wrote their own date library.
Never write your own date library
I was thinking to myself that this system MUST be less than 4 years old or it would have happened last February 29.
I hit a similar bug today where I had used
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.classic!