• umbraroze@kbin.social
      link
      fedilink
      arrow-up
      21
      ·
      1 year ago

      Funny thing, in ISO 8601 date isn’t separated by colon. The format is “YYYY-MM-DDTHH:MM:SS+hh:mm”. Date is separated by “-”, time is separated by “:”, date and time are separated by “T” (which is the bit that a lot of people miss). Time zone indicator can also be just “Z” for UTC. Many of these can be omitted if dealing with lesser precision (e.g. HH:MM is a valid timestamp, YYYY-MM is a valid datestamp if referring to just a month). (OK so apparently if you really want to split hairs, timestamps are supposed to be THH:MM etc. Now that’s a thing I’ve never seen anyone use.) Separators can also be omitted though that’s apparently not recommended if quick human legibility is of concern. There’s also YYYY-Wxx for week numbers.

    • JustinA
      link
      fedilink
      English
      arrow-up
      12
      ·
      1 year ago

      YYYY-MM-DDTHH:MM:SS.SSSSSSSSSZ

    • Unaware7013@kbin.social
      link
      fedilink
      arrow-up
      5
      ·
      1 year ago

      This, but all run together.

      I write files/reports to disk a lot from scripts, so that’s my preferred format.

        • Unaware7013@kbin.social
          link
          fedilink
          arrow-up
          3
          ·
          1 year ago

          Are you talking epoch? I don’t care for that mainly because it’s not human readable. I see the use for it, but I struggle with it in practical use.

          • naught@sh.itjust.works
            link
            fedilink
            arrow-up
            3
            ·
            1 year ago

            Yep. I mostly like datetimes for simple sorting. If it needs to be human readable iso is the way to go tho.