• ByteJunk@lemmy.world
      link
      fedilink
      arrow-up
      31
      ·
      7 days ago

      That’s an ISO date, and it’s gorgeous. It’s the only way I’ll accept working with dates and timezones, though I’ll make am exception for end-user facing output, and format it according to locale if I’m positive they’re not going to feed into some other app.

    • Amon@lemmy.world
      link
      fedilink
      arrow-up
      21
      arrow-down
      1
      ·
      edit-2
      7 days ago

      All my homies hate ISO

      Said no-one ever?

      EDIT: thanks for informing me i now retract my position

      • namingthingsiseasy@programming.dev
        link
        fedilink
        arrow-up
        38
        arrow-down
        2
        ·
        7 days ago

        Nah, ISO is a shit organization. The biggest issue is that all of their “standards” are blocked behind paywalls and can’t be shared. This creates problems for open source projects that want to implement it because it inherently limits how many people are actually able to look at the standard. Compare to RFC, which always has been free. And not only that, it also has most of the standards that the internet is built upon (like HTTP and TCP, just to name a few).

        Besides that, they happily looked away when members were openly taking bribes from Microsoft during the standardization of OOXML.

        In any case, ISO-8601 is a garbage standard. P1Y is a valid ISO-8601 string. Good luck figuring out what that means. Here’s a more comprehensive page demonstrating just how stupid ISO-8601 is: https://github.com/IJMacD/rfc3339-iso8601

          • derpgon@programming.dev
            link
            fedilink
            arrow-up
            3
            ·
            6 days ago

            Sure, it means something, and the meaning is not stupid. But since it is the same standard, it should be possible to be used to at least somehow represent the same data. Which it doesn’t.

            • groet@infosec.pub
              link
              fedilink
              arrow-up
              1
              ·
              6 days ago

              I think it is reasonable to say: “for all representation of times (points in time, intervals and sets of points or intervals etc) we follow the same standard”.

              The alternative would be using one standard for points in time, another for intervals, another for time differences, another for changes to a timezone, another for …

              • derpgon@programming.dev
                link
                fedilink
                arrow-up
                1
                ·
                5 days ago

                True, that is reasonable. However sometimes it could be represented as scope creep. Depends on the thing, really. The more broad a standard is, the easier it is to deviate from given standard or not implement certain feature because there is not enough resources to do so.

                I’d rather have multiple smaller standards than one big. However, I understand your reasoning.

              • lad@programming.dev
                link
                fedilink
                English
                arrow-up
                3
                ·
                6 days ago

                The alternative would be

                More reasonable, if you ask me. At least I came to value modularity in programming, maybe with standards it doesn’t work as good, but I don’t see why

                • groet@infosec.pub
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  6 days ago

                  Standards are used to increase interoperability between systems. The more different standards a single system needs the harder it is to interface with other systems. If you have to define a list of 50 standard you use, chances are the other system uses a different standard for at least one of them. Much easier if you rely on only a handful instead

  • PeriodicallyPedantic@lemmy.ca
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    5 days ago

    I just use millis since epoch

    (Recently learned that this isn’t accurate because it disguises leap seconds. The standard was fucked from the start)

  • Maggoty@lemmy.world
    link
    fedilink
    arrow-up
    14
    arrow-down
    1
    ·
    7 days ago

    Mmm US military date and time is fun too.

    DDMMMYYYYHHMM and time zone identifier. So 26JAN20251841Z.

    So much fun.

      • boonhet@lemm.ee
        link
        fedilink
        arrow-up
        6
        ·
        6 days ago

        Honestly look very readable to me, though I’m not sure on the timezone bit. Maybe they left it out? Ohterwise it’s 26th of January 2025, 18:41

        It’s gonna be problematic when there’s 5 digit years, but other than that it’s… not good, but definitely less ambiguous than any “normally formatted” date where DD <= 12. Is it MM/DD or DD/MM? We’ll never fucking know!

        Of course, YYYY-MM-DD is still the king because it’s both human readable and sortable as a regular string without converting it into a datetime object or anything.

        • jagungal@lemmy.world
          link
          fedilink
          arrow-up
          6
          ·
          edit-2
          6 days ago

          All you’d have to do to make it much more readable is separate the time and the year with some kind of separator like a hyphen, slash or dot. Also “Z” is the time zone, denoting UTC (see also military time zones)

          • boonhet@lemm.ee
            link
            fedilink
            arrow-up
            3
            ·
            edit-2
            6 days ago

            Oh, duh. It’s why all my timestamps have Z’s in the database lmao

            Thing is, you’re right that the separation would help, but this is still way less ambiguous that MM/DD vs DD/MM if you ask me.

  • DankOfAmerica@reddthat.com
    link
    fedilink
    English
    arrow-up
    1
    ·
    5 days ago

    Y’all be riskin it without holocene crypty

    SYSM:YY.DM.TzYDY.H.H

    4:40.42p EST on Jan 28, 12,025 ->

    • 4120:20.21.-4285.1.6

    That’s the one that was active when I started typing. However, I change it randomly using the decay of a radioactive isotope that is randomly chosen by the decay of a separate amount of Uranium-238. I’m two randoms in. This way, my time records are always encrypted using open-science source and the government can’t hack the pictures of my parking spots at the oncology center to sell them to the NIMBYs at MetAlphabet AI.

  • azi@mander.xyz
    link
    fedilink
    arrow-up
    11
    arrow-down
    8
    ·
    6 days ago

    Hot take: 2025-Jan-27 is better than 2025-01-27 in monolingual contexts.

  • Fushuan [he/him]@lemm.ee
    link
    fedilink
    English
    arrow-up
    90
    arrow-down
    1
    ·
    7 days ago

    “Europe”, as if there weren’t several languages in Europe with different date formats per language…

      • htrayl@lemmy.world
        link
        fedilink
        arrow-up
        25
        arrow-down
        17
        ·
        7 days ago

        Meh. It’s getting a lot of hate here, but I think it works well in casual short term planning. Context (July) - > precision (15).

        If I want to communicate the day in the current month, I just say the day, no month.

          • tomenzgg@midwest.social
            link
            fedilink
            English
            arrow-up
            15
            arrow-down
            5
            ·
            7 days ago

            No because the year is a super large time; there’s a reason people always say they take a bit to adjust to writing the new year in dates because it’s s long enough period of time that it almost becomes automatic.

            For archiving, sure; most other things, no (logically, ISO-8601 is probably the best for most cases, in general, but I’ll die on the hill that MM-DD-YYYY is better than DD-MM-YYYY).

            • stebo@lemmy.dbzer0.com
              link
              fedilink
              arrow-up
              28
              arrow-down
              3
              ·
              7 days ago

              well either you omit the year, or you start with it

              americans start with the month and end with the year, which is totally wild

                • Kacarott@aussie.zone
                  link
                  fedilink
                  arrow-up
                  2
                  arrow-down
                  1
                  ·
                  5 days ago

                  Because “context -> precision” is exactly the reason someone earlier gave as reasoning for the American system?

              • Mr_Blott@feddit.uk
                link
                fedilink
                arrow-up
                7
                arrow-down
                5
                ·
                7 days ago

                Everyone starts sentences with a capital letter, you shouldn’t be flinging shit mate 😂

              • tomenzgg@midwest.social
                link
                fedilink
                English
                arrow-up
                4
                arrow-down
                4
                ·
                7 days ago

                Again, – within most use cases – it really isn’t.

                In your day to day, will you need to know the year of a thing? Probably not; it’s probably with the year you’re currently in.

                Do you need to know the day of the month first? Probably not unless it’s within the current month so you need to know the month first.

                Telling me “22nd” on a paper means nothing if I don’t know what month we’re referring to; and, if I do need to know the year, – well – it’s always at the the of the date so it’s easy to locate rather than parsing the middle of the date, any.

                • stebo@lemmy.dbzer0.com
                  link
                  fedilink
                  arrow-up
                  8
                  arrow-down
                  1
                  ·
                  7 days ago

                  In your day to day, will you need to know the year of a thing? Probably not; it’s probably with the year you’re currently in.

                  that’s why I said you could omit it. did you read what I wrote?

            • Malfeasant@lemm.ee
              link
              fedilink
              arrow-up
              2
              ·
              6 days ago

              the year is a super large time

              Not when you’re old… I’ll be 50 this year, they’re flying by.

            • Mac@mander.xyz
              link
              fedilink
              English
              arrow-up
              3
              ·
              7 days ago

              Exactly. It would be like reading the minute of the clock before the hour.

  • nesc@lemmy.cafe
    link
    fedilink
    English
    arrow-up
    56
    arrow-down
    1
    ·
    7 days ago

    This pyramid visualisation doesn’t work for me, unless you read time starting with seconds.

    • Mirodir@discuss.tchncs.de
      link
      fedilink
      arrow-up
      31
      ·
      7 days ago

      A pyramid is built bottom to top, not top to bottom. That’s also one of the strengths of the ISO format. You can add/remove layers for arbitrary granularity and still have a valid date.

      • Zagorath@aussie.zone
        link
        fedilink
        English
        arrow-up
        31
        arrow-down
        1
        ·
        7 days ago

        Yeah, but people read top to bottom. The best way to do it would be to have upside down pyramids. With the biggest blocks at the top representing the biggest unit of time (YYYY) and the smallest blocks at the bottom representing seconds & smaller.

      • nesc@lemmy.cafe
        link
        fedilink
        English
        arrow-up
        28
        ·
        7 days ago

        I get it, just pyramids are misleading, also year-month-day is better because resulting number always grows. 😺

        • olympicyes@lemmy.world
          link
          fedilink
          English
          arrow-up
          5
          ·
          7 days ago

          Hold on there pal that time zone is ambiguous. Did you mean 11:40:20 UTC? If so, don’t forget your Z!

          • Zagorath@aussie.zone
            link
            fedilink
            English
            arrow-up
            1
            ·
            6 days ago

            I mean 11:40:20 in what NodaTime would call a “LocalDateTime”. i.e., irrespective of the time zone.

            (And incidentally, if you’re working in C# I strongly recommend the NodaTime library. And even if you’re not, I strongly recommend watching the lectures about dates and times by the NodaTime developer, who demonstrates a way of thinking about dates and times that is so much more thoughtful than what most standard libraries allow for without very careful attention paid by the programmer.)