Standards shouldn't be behind a paywall
- ISO 8601 is paywalled
- RFC allows a space instead of a T (e.g. 2020-12-09 16:09:…) which is nicer to read.
verstra, Relevant XKCD: xkcd.com/1179/
EmoDuck, Counterargument: xkcd.com/927/
verstra, Well, they cover very different formats: pbs.twimg.com/media/FdzPYu-UAAADHEq.jpg
KingThrillgore, 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.
K4mpfie, 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
Mubelotix, You HAVE to read the spec if you want to be compliant, you can’t just hope every detail is on wikipedia
EmperorHenry, I don’t get this one.
pomodoro_longbreak, programming.dev/c/programmer_humor is leaking.
They’re both standard for the format of dates and times, like
2023-12-13 15:52:21
. I guess one of them isn’t free, though? TIL.
TeckFire, The difference:
2023-12-12T21:18Z is ISO 8601 format
2023-12-12 21:18 is RFC 3339 Format
A small change
kogasa, That Z is doing a lot of work.
treadful, ISO 8601 also allows for some weird shit. Like
2023-W01-1
which actually means2022-12-31
. There’s a lot of cruft in that standard.
pomodoro_longbreak, wtf what is that gross
baltakatei, Week numbers are convenient for projects in which key delivery dates are often expressed in his many weeks out they are.
dullbananas, iSO
pomodoro_longbreak, savage
CetaceanNeeded, 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, 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.
Pratai, wtf does this even mean?
flambonkscious, 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)
datelmd5sum, I’ve worked with this one project for so long I can now read +%s timestamps.
somenonewho, That’s a certain kind of skill I wouldn’t want the need to have. I just copy paste those timestamps into a terminal with
date -d @
(and always forget the right syntax for that :D)
zik, Both ISO8601 and RFC3339 are YYYY-MM-DD. The difference is in how the date and time are separated.
flambonkscious, Than you! I was shooting from the hip half asleep (the classic ‘gosh I’m so clever’ moment for me…)
baltakatei, Also, ISO 8601 has some handy rules for expressing time lengths and periodicities.
drdabbles, 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.
magnetosphere, I don’t even know what ISO 8601 is, but I agree with the sentiment
stewsters, 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).
Hiro8811, Same
r00ty, RFC2795, because the IETF guys work hard, and then play hard on April fools.
Feathercrown, The space is SO MUCH BETTER
praise_idleness, allows a space instead of a T
That’s a bug not a feature
TheyCallMeHacked, It’s really a skill issue if replacing
T
by[T ]
in your regexp is hard
CallumWells, allows, not requires. It basically means you can use space instead of T when showing it to end users and any technical person can just use T
praise_idleness, Development wise, It’d be better if it’s required not allowed. Best case scenario, it’s just another redundant if statement.
CallumWells, The amount of things allowed by ISO 8601 is even more than what’s allowed by RFC 3339, if you take the time to look at ijmacd.github.io/rfc3339-iso8601/
OsrsNeedsF2P, (edited ) 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
Touching_Grass, Room for one more
warmaster, One of us, one of us, one of us
Amaltheamannen, Being a nerd is fun.
qaz, You’re not wrong
Trainguyrom, Thanks /u/OsrsNeedsF2P!
Encamped, I’m a Linux nerd and even I don’t get this 😭
rtxn, (edited ) You’ve just become the nemesis of the entire unix-like userbase for praising the space.
meekah, (edited ) What’s the issue with the space?
rtxn, 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 fileshello
andworld.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.
meekah, (edited ) but what does the command line matter for dates? sure every once in a while you’ll have to pass a date as an argument on the command line but I think usually that kind of data is handled by APIs without human intervention, so once these are set up properly, I don’t see the problem
rtxn, <span style="color:#323232;">rsync -a "somedir" "somedir_backup_$(date)" </span>
If the
date
command returns an RFC-3339-formatted string, the filename will contain a space. If, for example, you want to iterate over the files usingfor d in $(find…)
and forget to set$IFS
properly, it can cause issues.
lolcatnip, But
$(date)
does return a string with spaces, at least on every system I’ve ever used. And what’s so bad about the possibility of spaces in filenames? They’re slightly inconvenient in a command line, but I haven’t used a commuter this century that didn’t support spaces in filenames.
rtxn, Bro, literally re-read the comment you replied to. It has an example of what might happen.
lolcatnip, (edited ) Ok, I just reread it. I don’t see what you think I’m missing. You mean an improperly written find command misbehaving? The fact that a different date format could prevent a bug from manifesting doesn’t seem like much of an argument.
black0ut, Spaces can exist in filenames. The only problem is that they have to be escaped. As the comment that you reread explained,
cat hello world.txt
would print the fileshello
andworld.txt
. If you wanted to print the file“hello world.txt”
you’d either need to quote it (cat “hello world.txt”
) or escape the space (cat hello world.txt
)
lolcatnip, Oh, the horror!
meekah, Hm, I guess I just don’t agree that CLI usablity comes before readability.
rtxn, Again, it’s not just CLI, it’s an insurance against misinterpreted characters breaking programs.
meekah, honestly, if a space breaks your program, it’s kind of a shit program.
rtxn, Yeah? I once spent an entire week debugging a plaintext database because the software expected the record identifiers to be tokenized a certain way, but the original data source had spaces in those strings.
The software was the ISC DHCP server, the industry standard for decades and only EOL’d a year ago.
meekah, Sounds like a weekend that you could have saved if the software was just implemented properly and accepted spaces.
Something being an industry standard does not necessarily mean it’s good. Sometimes it just means it was the cheapest, or sometimes even just because it was used for so long. How long did it take for Torx to somewhat replace philips head screws despite being better in most cases?
I think date strings are made for human and machine readability. Similar to XML or JSON. So, why not improve systems so that we can have more human readable date strings? If you don’t care about human readability and want to make sure there is no confusion with spaces, you can just use epoch timestamps.
Knusper, 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.
lowleveldata, A space is more problematic than a T tho
qaz, Skill issue
lowleveldata, For a skilled pro like you I suggest using epoch time for everything
datelmd5sum, 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?
Transporter_Room_3, 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.
Add comment