this post was submitted on 12 Dec 2023
576 points (94.7% liked)

Memes

45581 readers
1 users here now

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.

founded 6 years ago
MODERATORS
 
  • ISO 8601 is paywalled
  • RFC allows a space instead of a T (e.g. 2020-12-09 16:09:...) which is nicer to read.
top 50 comments
sorted by: hot top controversial new old
[–] OsrsNeedsF2P@lemmy.ml 97 points 2 years ago* (last edited 2 years ago) (5 children)

Top post of the hour is about an RFC from >20 years ago.

This is worse than the Linux stuff.

Y'all a bunch of nerds

[–] qaz@lemmy.world 92 points 2 years ago

You’re not wrong

[–] Touching_Grass@lemmy.world 46 points 2 years ago (1 children)
[–] warmaster@lemmy.world 19 points 2 years ago

One of us, one of us, one of us

[–] Amaltheamannen@lemmy.ml 27 points 2 years ago

Being a nerd is fun.

[–] Trainguyrom@reddthat.com 7 points 2 years ago

Thanks /u/OsrsNeedsF2P!

load more comments (1 replies)
[–] lowleveldata@programming.dev 97 points 2 years ago (1 children)

A space is more problematic than a T tho

[–] qaz@lemmy.world 53 points 2 years ago (2 children)
[–] lowleveldata@programming.dev 37 points 2 years ago (1 children)

For a skilled pro like you I suggest using epoch time for everything

[–] datelmd5sum@lemmy.world 4 points 2 years ago

Cassandra uses epoch milliseconds for timestamping snapshots. This means that each node will have a different name for the same snapshot. Trivially solved with truncating the timestamp with * wildcard, but just... why?

Any other day I'd see this get laughs, but I guess people are bitchier this time of day.

I'd write down the ISO timecode I'm talking about, but I can't afford it.

[–] rtxn@lemmy.world 65 points 2 years ago* (last edited 2 years ago) (2 children)

You've just become the nemesis of the entire unix-like userbase for praising the space.

[–] meekah@lemmy.world 18 points 2 years ago* (last edited 2 years ago) (1 children)

What's the issue with the space?

[–] rtxn@lemmy.world 39 points 2 years ago (14 children)

On the command line, space is what separates each argument. If a path contains a space, you either have to quote the entire path, or use an escape character (e.g. the \ character in most shells, the backtick in Powershell because Microsoft is weird, or the character's hexadecimal value), otherwise the path will be passed to the command as separate arguments. For example, cat hello world.txt would try to print the files hello and world.txt.

It is a good practice to minimize the character set used by filenames, and best to only use English alphanumeric characters and certain symbols like -, _, and .. Non-printable characters (like the lower half of ASCII), weird diacritics (like ő or ű), ligatures, or any characters that could be misinterpreted by a program should be avoided.

This is why byte-safe encodings, like base64 or percent-encoding, are important. Transmitting data directly as text runs the risk of mangling the characters because some program misinterpreted them.

load more comments (14 replies)
[–] Knusper@feddit.de 4 points 2 years ago

I'm not exactly fond of the space either, but man, the T is noisy. They could've gone with an underscore or something, so it actually looks like two different sections.

[–] TeckFire@lemmy.world 38 points 2 years ago (4 children)

The difference:

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

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

A small change

[–] treadful@lemmy.zip 23 points 2 years ago (3 children)

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.

[–] SirQuackTheDuck@lemmy.world 8 points 2 years ago (4 children)

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
load more comments (4 replies)
[–] EnderMB@lemmy.world 8 points 2 years ago

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.

load more comments (1 replies)
[–] kogasa@programming.dev 13 points 2 years ago (1 children)

That Z is doing a lot of work.

[–] TeckFire@lemmy.world 9 points 2 years ago (1 children)

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.

[–] kogasa@programming.dev 11 points 2 years ago (6 children)

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."

load more comments (6 replies)
[–] hyperhopper@lemmy.world 6 points 2 years ago (1 children)

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.

[–] elauso@feddit.de 15 points 2 years ago (1 children)

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

load more comments (1 replies)
load more comments (1 replies)
[–] KingThrillgore@lemmy.ml 36 points 2 years ago (2 children)

Its funny because everything about ISO 8601 is covered on its Wikipedia article. Very few people need to spend the francs to need the spec.

[–] Mubelotix@jlai.lu 22 points 2 years ago (2 children)

You HAVE to read the spec if you want to be compliant, you can't just hope every detail is on wikipedia

[–] Sylvartas@lemmy.world 7 points 2 years ago

Also, even if you fully respect the specs, I assume you can't get certified as "compliant" by ISO if you didn't pay for the specs ?

[–] cashews_best_nut@lemmy.world 4 points 2 years ago

"HAVE" to like Germans HAVE to have their driving license to drive?

[–] K4mpfie@feddit.de 7 points 2 years ago (1 children)

If you want to be compliant for a standard you need to have a copy of it. Luckily it's only companies that really need to buy them

[–] SirQuackTheDuck@lemmy.world 8 points 2 years ago

Which means the companies using the specs pay the company making the specs for everyone (companies and people) to use.

That sounds fair, but I wouldn't be surprised if capitalism fucked it up anyhow.

[–] AnnaFrankfurter@lemmy.ml 28 points 2 years ago (1 children)

Yeah I like a girl who is firm on her choice of date time format....😂😂😂😂

[–] OsrsNeedsF2P@lemmy.ml 25 points 2 years ago (2 children)

I personally have a list of 14 RFCs I won't compromise on when it's a first date

[–] Tartas1995@discuss.tchncs.de 18 points 2 years ago* (last edited 2 years ago)

Please be serious and give me that list! Please be real!

Edit: guys, if they don't answer, they might just missed the question. They might be real. BELIEVE!!!

[–] qaz@lemmy.world 12 points 2 years ago

Do you care to share them?

[–] magnetosphere@kbin.social 26 points 2 years ago (2 children)

I don’t even know what ISO 8601 is, but I agree with the sentiment

[–] stewsters@lemmy.world 24 points 2 years ago

https://en.m.wikipedia.org/wiki/ISO_8601

Date format that is both human readable and for the most part sortable as strings (assuming you are using the same time zone).

load more comments (1 replies)
[–] verstra@programming.dev 22 points 2 years ago (1 children)
[–] qaz@lemmy.world 8 points 2 years ago

TIL, didn’t know that

[–] verstra@programming.dev 16 points 2 years ago
[–] CetaceanNeeded@lemmy.world 9 points 2 years ago (1 children)

How could it be paywalled? I've never heard of anyone paying ISO to be able to write the date and time in a handy way.

[–] sushibowl@feddit.nl 66 points 2 years ago (1 children)

What he means is, if you want to download the document from ISO that describes the standard, you have to pay a fee. Here's their store page: click.

It's about 190 USD for a 38 page document describing the rules of the standard. There's another document with extensions for a similar price. Quite pricey for a PDF file obviously, and the RFC is free to download.

On the other hand, no one in the history of time has gone "hmm, I don't know how ISO-8601 works, let me go buy this document from the ISO store to figure it out." Most people just call datetime.isoformat() or whatever their library function is called.

load more comments (1 replies)
[–] r00ty@kbin.life 4 points 2 years ago

RFC2795, because the IETF guys work hard, and then play hard on April fools.

[–] PricklyHeart@lemmy.world 4 points 2 years ago (3 children)

We need a better one....

Ymd-ymd-yhms-yhms

Much clearer and easier for programmers.

[–] Sir_Simon_Spamalot@lemmy.world 4 points 2 years ago (1 children)

Right now, it's 210-024-200-379

load more comments (1 replies)
load more comments (2 replies)
[–] dullbananas@lemmy.ca 4 points 2 years ago
load more comments
view more: next ›