this post was submitted on 12 Dec 2023
629 points (95.1% liked)

Memes

45643 readers
1083 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 5 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
[–] [email protected] 112 points 11 months ago* (last edited 11 months 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

[–] [email protected] 99 points 11 months ago

You’re not wrong

[–] [email protected] 50 points 11 months ago (1 children)
[–] [email protected] 21 points 11 months ago

One of us, one of us, one of us

[–] [email protected] 30 points 11 months ago

Being a nerd is fun.

[–] [email protected] 10 points 11 months ago

Thanks /u/OsrsNeedsF2P!

load more comments (1 replies)
[–] [email protected] 108 points 11 months ago (1 children)

A space is more problematic than a T tho

[–] [email protected] 57 points 11 months ago (2 children)
[–] [email protected] 43 points 11 months ago (1 children)

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

load more comments (1 replies)
[–] [email protected] 30 points 11 months ago

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.

[–] [email protected] 74 points 11 months ago* (last edited 11 months ago) (2 children)

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

[–] [email protected] 21 points 11 months ago* (last edited 11 months ago) (1 children)

What's the issue with the space?

[–] [email protected] 45 points 11 months 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)
load more comments (1 replies)
[–] [email protected] 42 points 11 months 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

[–] [email protected] 26 points 11 months ago (4 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.

[–] [email protected] 8 points 11 months 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.

[–] [email protected] 8 points 11 months 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)
load more comments (2 replies)
[–] [email protected] 14 points 11 months ago (1 children)

That Z is doing a lot of work.

[–] [email protected] 10 points 11 months 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.

[–] [email protected] 12 points 11 months 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)
[–] [email protected] 5 points 11 months 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.

[–] [email protected] 17 points 11 months 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)
[–] [email protected] 38 points 11 months 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.

[–] [email protected] 23 points 11 months 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

[–] [email protected] 7 points 11 months 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 ?

[–] [email protected] 5 points 11 months ago

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

[–] [email protected] 8 points 11 months 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

[–] [email protected] 7 points 11 months 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.

[–] [email protected] 29 points 11 months ago (2 children)

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

[–] [email protected] 27 points 11 months ago (2 children)

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

[–] [email protected] 21 points 11 months ago* (last edited 11 months 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!!!

[–] [email protected] 14 points 11 months ago

Do you care to share them?

[–] [email protected] 11 points 11 months ago

Linux sex tips approved

[–] [email protected] 28 points 11 months ago (2 children)

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

[–] [email protected] 30 points 11 months 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)
[–] [email protected] 22 points 11 months ago (1 children)
[–] [email protected] 9 points 11 months ago

TIL, didn’t know that

[–] [email protected] 17 points 11 months ago (2 children)
[–] [email protected] 10 points 11 months ago (2 children)

This is about the old argument around how date strings are formatted.

MMDDYYYY vs YYYYMMDD, spaces or hyphens may differ. It's an old and passionate argument (mostly due to the American approach of starting with the month being insane)

[–] [email protected] 21 points 11 months ago (2 children)

Both ISO8601 and RFC3339 are YYYY-MM-DD. The difference is in how the date and time are separated.

[–] [email protected] 7 points 11 months ago

Than you! I was shooting from the hip half asleep (the classic 'gosh I'm so clever' moment for me...)

load more comments (1 replies)
[–] [email protected] 6 points 11 months ago (1 children)

I've worked with this one project for so long I can now read +%s timestamps.

load more comments (1 replies)
[–] [email protected] 9 points 11 months ago (1 children)

ISO standards need to be purchased to be viewed, RFCs are freely available requests for comment. The RFC 3339 format is effectively the same is the ISO format, except RFC 3339 allows for a space between the date and time components whereas the ISO format uses a "T" character to separate date and time components.

If you want to get real weird, RFCs are not standards but rather a request for other participants to comment on the proposal. RFCs tend to be pointed towards as de facto standards though, even before they become a BCP or STD.

load more comments (1 replies)
[–] [email protected] 17 points 11 months ago (1 children)
load more comments (1 replies)
[–] [email protected] 10 points 11 months 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.

[–] [email protected] 71 points 11 months 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)
load more comments
view more: next ›