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

  • Rikudou_Sage@lemmings.world
    link
    fedilink
    English
    arrow-up
    55
    ·
    2 years 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)

  • Randelung@lemmy.world
    link
    fedilink
    English
    arrow-up
    37
    ·
    2 years ago

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

  • Ex Nummis@lemmy.world
    link
    fedilink
    English
    arrow-up
    37
    ·
    2 years 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
      33
      ·
      2 years 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.

  • Blackmist@feddit.uk
    link
    fedilink
    English
    arrow-up
    16
    ·
    2 years 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.

    • JoBo@feddit.uk
      link
      fedilink
      English
      arrow-up
      13
      ·
      2 years 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.

      • Epzillon@lemmy.world
        link
        fedilink
        English
        arrow-up
        5
        ·
        2 years ago

        As a new programmer who actively treads carefully in date-data-dabbling territories it is amusing to see how shit commercially available code is, especially in the e-commerce world.

        I started my first programming job 2 years ago working with building Magento 2 sites. I already knew Magento was a horrible mess to begin with, but I took whatever I could get. After witnessing the publishers, developers and code of 99% of the plugins available (which is btw quality certified on Adobes marketplace) I can safely say that there is so much shit code squirted out every second be self-taught developers working in shitty small companies with CEOs trying to earn a quick buck.

        It is actually insane how bad the code was, I can not with words describe how bad it was. Every time I felt impostor syndrome i would just open up vendor and look at a random plugin to confirm that I am at least not a Magento plugin developer.

        If you’re running Magento, change, preferably 10 years ago, but change.

      • Isoprenoid@programming.dev
        link
        fedilink
        English
        arrow-up
        4
        ·
        2 years ago

        It’d be astonishing if all the pumps in NZ were still using the same code as four years ago.

        You put far too much confidence in software teams.