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
    2
    ·
    10 months ago

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

    • BrianTheeBiscuiteer@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 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.

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

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