• ILaughBecauseFunny@feddit.dk
    link
    fedilink
    arrow-up
    5
    ·
    2 hours ago

    Issue: there are 27 different ways of writing a date.

    Engineers: We most make a common standard that is unambiguous, easy to understand and can replace all of these.

    Issue: there are 28 different ways of writing a date.

    Joke aside, I really think the iso standard for dates is the superior one!

  • driving_crooner@lemmy.eco.br
    link
    fedilink
    arrow-up
    3
    ·
    6 hours ago

    In the last company I work for, the department was created from zero, and my boss just let me take all the technical decisions so from the begging everything was wrote in ISO-8601. When I left it was just the way it was, if you try to use any other date format anywhere something is going to give you an error.

    • m_f@discuss.online
      link
      fedilink
      English
      arrow-up
      1
      ·
      54 minutes ago

      Do you mean the post titles? I’ve been using the same format as was used since before I took over posting, but if people want ISO format that works for me

  • arc@lemm.ee
    link
    fedilink
    arrow-up
    29
    ·
    15 hours ago

    The sane way of dealing with it is to use UTC everywhere internally and push local time and local formatting up to the user facing bits. And if you move time around as a string (e.g. JSON) then use ISO 8601 since most languages have time / cron APIs that can process it. Often doesn’t happen that way though…

    • nBodyProblem@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      11 minutes ago

      The BEST way is to use the number of seconds after the J2000 epoch (The Gregorian date January 1, 2000, at 12:00 Terrestrial Time)

    • expr@programming.dev
      link
      fedilink
      arrow-up
      7
      ·
      13 hours ago

      Generally yes, that’s the way to do it, but there are plenty of times where you need to recreate the time zone something was created for, which means additionally storing the time zone information.

    • hazypenguin@feddit.nl
      link
      fedilink
      arrow-up
      4
      ·
      13 hours ago

      Definitely. If your servers aren’t using UTC, then when you’re trying to sync data between different timezones, you’re making it harder for yourself.

  • WoodScientist@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    45
    arrow-down
    2
    ·
    18 hours ago

    I propose that we amend the ISO to require the days of the week be named after their etymological roots in that language.

    English Days of the Week:
    Day of the Sun
    Day of the Moon
    Day of Týr
    Day of Odin
    Day of Thor
    Day of Frēa
    Day of Saturn

    Imagine dating a meeting, “Day of Odin, May 7, 2025.” Imagine a store receipt that says, “Day of Thor, June 5, 2025.” Imagine telling a friend, “July 4th falls on a Day of Frēa this year!”

    THIS IS WHAT WE COULD HAVE. THIS IS WHAT WE HAVE LOST. THIS IS WHAT WAS STOLEN FROM US.

    We could bring it back. We could make this the norm. We could make this real. We could summon this bit of ancient magic back into our world. Let’s remember what we actually named these days for! BRING BACK THE DAY OF THOR!

  • jaxxed@lemmy.ml
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    7 hours ago

    I was going to comain until I realized that the fprmat is the one that I prefer.

  • vga@sopuli.xyz
    link
    fedilink
    arrow-up
    17
    ·
    edit-2
    19 hours ago

    ISO 8601 allows all kinds of crazy time stamps. RFC 3339 is much nicer and simpler, and the sweet spot is at the intersection of ISO 8601 and RFC 3339.

    Then again, ISO 8601 contains some nice things that RFC 3339 does not, like ranges and durations, recurrences…

    https://ijmacd.github.io/rfc3339-iso8601/

    • ameancow@lemmy.world
      link
      fedilink
      English
      arrow-up
      4
      ·
      8 hours ago

      As an American, I can’t get people in my team to standardize their email signatures with correct spelling.

  • Burninator05@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    arrow-down
    2
    ·
    14 hours ago

    Everyone should use date-time groups so we’re all on the same page down to the second.

    DDHHMMSSZmmmYY

      • GreyEyedGhost@lemmy.ca
        link
        fedilink
        arrow-up
        13
        ·
        19 hours ago

        If I, my software, or my data last this long, I will have nearly 8000 years to resolve it. Which is to say, the year 9998 is going to get busy.

      • Saleh@feddit.org
        link
        fedilink
        arrow-up
        14
        ·
        1 day ago

        Can be solved with a small shellscript adding a leading zero to all filenames with the format.

      • thesmokingman@programming.dev
        link
        fedilink
        arrow-up
        2
        arrow-down
        1
        ·
        1 day ago

        I’d be curious to see a sorting algorithm that doesn’t handle YYYYY-MM-DD with YYYY-MM-DD properly. If you drop the dashes you still get a proper numeric order. If you sort by component, you still get the proper order. Maybe a string sort wouldn’t? Off the top of my head the languages I’m thinking either put longer strings later, giving us the proper order, or could put 1YYYY- ahead of 1YYY-M so maybe string sorting is the only one that’s out.

        • HailHydra@infosec.pub
          link
          fedilink
          English
          arrow-up
          15
          ·
          edit-2
          1 day ago

          Lexical sorting (string sorting/alphabetical order sorting) is what I believe they were referring to when talking about file names.

          The fact that you don’t have to do any parsing of the string at all, just do a straight character-by-character alphabetical sort, and they will be sorted by date, is a great benifit of this date scheme. That means in situations where no special parsing is set up (eg, in a File Explorer windows showing a folders contents sorted alphabetically) or where your string isn’t strictly date only (eg, a file name format such as ‘2025-05-02 - Project 3.pdf’) you can still have everything sorted by date just by sorting alphabetically.

          Its this benifit that is lost when rolling over to 5-digit years.

          • JackbyDev@programming.dev
            link
            fedilink
            English
            arrow-up
            2
            ·
            21 hours ago

            I bet you could make a one liner to rename files with YYYY-MM-DD to 0YYYY-MM-DD fairly easily. Not a problem.

          • The_Decryptor@aussie.zone
            link
            fedilink
            English
            arrow-up
            2
            arrow-down
            1
            ·
            23 hours ago

            It’s an easy fix at least, just check if you’re comparing numbers on both sides and switch to a simple numerical sort.

            I think Windows used to get this wrong, but it was fixed so long ago that I’m not even sure now.

    • blazeknave@lemmy.world
      link
      fedilink
      arrow-up
      8
      ·
      23 hours ago

      Omg thank you!! Everyone sees my notes thinks I’m crazy for obsessing… It’s the correct fucking sort!