I know this isn’t any kind of surprise, and yet, well…

  • @accidentalloris
    link
    411 year ago

    Then there’s my code, which didn’t even survive the time change.

    • @[email protected]
      link
      fedilink
      English
      141 year ago

      In every project I’ve ever worked on, there’s been somebody who must have been like, “HurDur Storing timestamps in UTC is for losers. Nyeaahh!”

      And if I ever find that person, I’m going to get one of those foam pool noodles, and whack him/her over the head with it until I’ve successfully vented all my frustrations.

      • @humorlessrepost
        link
        English
        161 year ago

        I just use a float between 0 and 1 with 0 being 1970 and 1 being the predicted heat death of the universe.

        • Rikudou_Sage
          link
          fedilink
          11 year ago

          Isn’t it like trillions trillions trillions… years in the future?

          • @humorlessrepost
            link
            English
            2
            edit-2
            1 year ago

            It’ll lose most of its accuracy long after all life stops existing, so nobody will be around to file bug tickets.

      • @48954246
        link
        English
        31 year ago

        The only time using UTC breaks down is when any sort of time change gets involved.

        If I say I want a reminder at 9am six months from now and you store that as UTC, a day light savings change will mean I get my reminder an hour early or late depending on where in the world I am

  • @TootSweet
    link
    English
    18
    edit-2
    1 year ago

    People who haven’t had a birthday in almost four years are like

    reaction gif of a little boy busting out a funny celebratory dance in the stands of (probably) an unknown sports event.

  • @[email protected]
    link
    fedilink
    111 year ago

    Programming aside, where I live in Southern Europe we have a tradition according to which leap years bring bad luck. After 2020, I don’t know what to expect… nuclear apocalypse maybe?

      • @Land_Strider
        link
        7
        edit-2
        1 year ago

        Previous commenter meant “what could be worse than the bad luck leap year 2020?”

  • @Synthead
    link
    English
    101 year ago

    Always, always, always, without taking any shortcuts, use a tzinfo library for your language.

  • 👍Maximum Derek👍
    link
    fedilink
    English
    61 year ago

    I’m not worried about my code, I’m (very slightly) worried about all the date libraries I used because I didn’t want code that shit again for the billionth time.

    • @[email protected]OP
      link
      fedilink
      English
      61 year ago

      Your comment made me go look at the source for moment.js. It has “leap” 13 times and the code looks correct. I assume they test stuff like this.

      • 👍Maximum Derek👍
        link
        fedilink
        English
        31 year ago

        Yeah, I’m generally using the common data/time libraries in most (if not all) languages and I’m pretty sure they’ve all been through more than 1 leap year at this point. I just never 100% trust the code I don’t control - 99.9% maybe, but never 100.

        • @lightnegative
          link
          31 year ago

          I just never 100% trust the code I don’t control

          I never 100% trust the code I do control. Partially because a lot of it is inherited but also because I know corners were cut but I can’t always remember when and where

    • @killeronthecorner
      link
      English
      31 year ago

      Before it was 50/50 that they’d fail on leap day, but after the patch it’s 50/50.

  • @superweeniehutjrs
    link
    21 year ago

    I hope the homeassistant guys already have this covered, because I didn’t use it 4 years ago to know