• arc@lemm.ee
    link
    fedilink
    arrow-up
    18
    ·
    7 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…

    • expr@programming.dev
      link
      fedilink
      arrow-up
      6
      ·
      5 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
      2
      ·
      5 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
    37
    arrow-down
    1
    ·
    10 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!

    • ameancow@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      48 minutes 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
    ·
    6 hours ago

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

    DDHHMMSSZmmmYY

    • De_Narm@lemmy.world
      link
      fedilink
      arrow-up
      9
      ·
      8 hours ago

      Do you know why one would ever do that? 20(02/05)25 feels like the “Don’t Dead Open Inside” of dates.

      • ameancow@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        47 minutes ago

        Which is exactly why they’re used on tombstones. See, the world makes sense after all!

  • vga@sopuli.xyz
    link
    fedilink
    arrow-up
    15
    ·
    edit-2
    11 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/

  • xeekei@lemm.ee
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    3
    ·
    5 hours ago

    I just don’t like to be forced to include the damn year everytime, and if you cut the year from ISO 8601 you get the american MM-DD order, which everybody hates.

    I like DD/MM/YYYY. 🤷🏻‍♂️

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

      If it’s just in casual conversation or emails DD/MM/YYYY is fine, but if you’re naming documents or something in a professional setting, you should really always include the year anyway.

  • MissJinx@lemmy.world
    link
    fedilink
    arrow-up
    7
    arrow-down
    1
    ·
    edit-2
    11 hours ago

    I work at a global company an in my team there are people from 5 continents. we use 27-Feb-23. It’s the only way nobody gets confused and it’s only 1 char more. (Tbf nobody would be confused only my boss that is american lol)

  • ljosalhusky@lemmy.world
    link
    fedilink
    arrow-up
    4
    arrow-down
    2
    ·
    10 hours ago

    You know, I used to think ISO 8601 was just a boring technical standard for writing dates. But now I see it’s clearly the first step in a grand master plan! First, they make us write the year first, then the month, then the day-suddenly, our beloved 17.05.2025 turns into 2025-05-17. My birthday now looks like a WiFi password, and my calendar feels like a math equation.

    But it doesn’t stop there. Today it’s the date format, tomorrow we’ll all be reading from right to left, and before you know it, our keyboards will be rearranged so QWERTY is replaced with mysterious squiggles and dots. Imagine the panic:

    “First they came for our dates, then they came for our keyboards!”

    At this rate, I’ll be drinking mint tea instead of coffee, my local kebab shop will start offering lutefisk shawarma, and Siri will only answer to “Inshallah.” The right-wing tabloids will have a field day:

    “Western Civilization in Peril: Our Months and Days Held Hostage!”

    But let’s be honest-if the worst thing that happens is we finally all agree on how to write today’s date, maybe world peace isn’t so far off. Until then, I’ll be over here, clutching my calendar and practicing my right-to-left reading skills… just in case.

    (Don’t worry,this was just a joke! No offense intended-unless you’re a die-hard fan of confusing date formats, in which case, may the ISO be ever in your favor!)

    Peace!

  • essteeyou@lemmy.world
    link
    fedilink
    arrow-up
    29
    ·
    17 hours ago

    My goodness, some of the comments in here must come from people who thought that those writing the standard were morons who did no research.

  • JackbyDev@programming.dev
    link
    fedilink
    English
    arrow-up
    11
    ·
    15 hours ago

    I feel like YYYYMMDD (without dashes) might be a format in ISO 8601, but I’m fully expecting to be corrected soon. But I didn’t say think, I said feel. YYYYMMDD has a similar vibe to YYYY-MM-DD, ya feel me?

    • compostgoblin@slrpnk.netOP
      link
      fedilink
      English
      arrow-up
      12
      ·
      15 hours ago

      Nope, you are correct! From the Wikipedia page, which cites the standards document:

      • Representations can be done in one of two formats – a basic format with a minimal number of separators or an extended formatwith separators added to enhance human readability. The standard notes that “The basic format should be avoided in plain text.” The separator used between date values (year, month, week, and day) is the hyphen, while the colon is used as the separator between time values (hours, minutes, and seconds). For example, the 6th day of the 1st month of the year 2009 may be written as “2009-01-06” in the extended format or as “20090106” in the basic format without ambiguity.
    • blazeknave@lemmy.world
      link
      fedilink
      arrow-up
      8
      ·
      16 hours ago

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

      • GreyEyedGhost@lemmy.ca
        link
        fedilink
        arrow-up
        12
        ·
        11 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
        16
        ·
        20 hours 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
        ·
        21 hours 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
          16
          ·
          edit-2
          20 hours 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
            ·
            14 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
            1
            arrow-down
            1
            ·
            16 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.

  • Doubleohdonut@lemmy.ca
    link
    fedilink
    arrow-up
    2
    arrow-down
    6
    ·
    6 hours ago

    Working for a global clinical research company, DD-Mmm-YYYY is the easiest for everyone to understand and be on the same page. It’s bad enough identifying which date you’re capturing in metadata without also trying to juggle multiple date formats.