Self-pay gas station pumps break across NZ as software can’t handle Leap Day::“We’ll add it to our Outlook reminders…”

  • Randelung@lemmy.world
    link
    fedilink
    English
    arrow-up
    6
    ·
    7 months ago

    And THAT’S why you don’t roll your own datetime class/column format. It’s a solved problem, people!

  • Rikudou_Sage@lemmings.world
    link
    fedilink
    English
    arrow-up
    5
    ·
    7 months ago

    It was millennia ago when I first read “don’t ship your own date/time library”. Guess these fellas somehow missed it.

    (I did this thing a while ago, but hopefully it doesn’t count since it’s a joke library)

  • Blackmist@feddit.uk
    link
    fedilink
    English
    arrow-up
    2
    ·
    7 months ago

    Days you should book off as a developer:

    Feb 29th. Clocks go forward day. Clocks go back day.

    If you’ve done anything with dates or scheduling, these days will fuck it.

  • Kyrgizion@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    7 months ago

    Hahah, this reminds me of that time (long ago) when a very old version of our software would also simply crash when attempting to use it on a leap day. When customers called in, all we could do was tell them to wait until tomorrow, and that the problem wouldn’t return for at least another four years.

    • BrianTheeBiscuiteer@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      7 months ago

      I can’t imagine what logic would’ve hinged on February having 28 days. It’s not like 29 exceeds some maximum value for days in a month. Probably someone thought it was a good idea to write their own date-time library.

    • JoBo@feddit.uk
      link
      fedilink
      English
      arrow-up
      1
      ·
      7 months ago

      This was one company, with only their NZ code affected. It’d be astonishing if all the pumps in NZ were still using the same code as four years ago. And not at all astonishing that coders are still making careless errors to do with dates.