• ISO 8601 is paywalled
  • RFC allows a space instead of a T (e.g. 2020-12-09 16:09:…) which is nicer to read.
You are viewing a single thread.
View all comments
42 points

The difference:

2023-12-12T21:18Z is ISO 8601 format

2023-12-12 21:18 is RFC 3339 Format

A small change

permalink
report
reply
5 points

I definitely don’t agree that the RFC is easier to read, the two numbers can appear to be one at a quick glance without a separator.

permalink
report
parent
reply
17 points

But there is a separator between the numbers: the same one that also very reliably separates the words in this comment

permalink
report
parent
reply
1 point
  1. A single separator is better than a choice of separators to mean the same thing.
  2. A space is not as apparent in a large log of data as a capital T
  3. Human language is not as strict as a programming language. There is a reason you see people still using “alot” and “a lot”. That just proves it’s easy to overlook and commonly happens.
permalink
report
parent
reply
14 points

That Z is doing a lot of work.

permalink
report
parent
reply
10 points

Z indicates UTC. Alternatively,

2023-12.12T21:18-05 for time zone as central. The UTC time zone code at the end just tells you where the time is taken from. Usually Z is used since, well, it’s “universal,” but having a +13 or -06 or whatever else brings context, and allows computers to synchronize the string of text into a comparable time for event logs and such.

permalink
report
parent
reply
12 points

Yes. The RFC is missing something that explicitly indicates the time zone. The Z is a great unambiguous way of saying “yes, this is UTC.”

permalink
report
parent
reply
3 points

Both are valid (if you’d add seconds) in both RFC 3339 and ISO 8601, but timezone support is the same here and there…

permalink
report
parent
reply
26 points

ISO 8601 also allows for some weird shit. Like 2023-W01-1 which actually means 2022-12-31. There’s a lot of cruft in that standard.

permalink
report
parent
reply
8 points

This is the killer for me. Most people promote ISO 8601 as a “definitive” date structure, when it actually supports a lot of different formats. What they actually want is usually RFC 3339.

permalink
report
parent
reply
8 points

Doesn’t the ISO also includes time periods? Because if it does, those are amazing.

Without any explanation, you should be able to decypher these periods just by looking at them:

  • P1Y
  • P6M2D
  • P1DT4H
  • PT42M
permalink
report
parent
reply
1 point

Hmm I don’t get the T there tbh

permalink
report
parent
reply
3 points

Week numbers are convenient for projects in which key delivery dates are often expressed in his many weeks out they are.

permalink
report
parent
reply
2 points

wtf what is that gross

permalink
report
parent
reply

Memes

!memes@lemmy.ml

Create post

Rules:

  1. Be civil and nice.
  2. Try not to excessively repost, as a rule of thumb, wait at least 2 months to do it if you have to.

Community stats

  • 11K

    Monthly active users

  • 13K

    Posts

  • 288K

    Comments