this post was submitted on 26 Jan 2025
616 points (96.0% liked)

196

19078 readers
20 users here now

Be sure to follow the rule before you head out.


Rule: You must post before you leave.



Other rules

Behavior rules:

Posting rules:

NSFW: NSFW content is permitted but it must be tagged and have content warnings. Anything that doesn't adhere to this will be removed. Content warnings should be added like: [penis], [explicit description of sex]. Non-sexualized breasts of any gender are not considered inappropriate and therefore do not need to be blurred/tagged.

If you have any questions, feel free to contact us on our matrix channel or email.

Other 196's:

founded 2 years ago
MODERATORS
616
ISO 8601 ftw rule (gregtech.eu)
submitted 1 year ago* (last edited 1 year ago) by lena to c/196@lemmy.blahaj.zone
 

!iso8601@lemmy.sdf.org gang, rise up

you are viewing a single comment's thread
view the rest of the comments
[–] nesc@lemmy.cafe 55 points 1 year ago (2 children)

This pyramid visualisation doesn't work for me, unless you read time starting with seconds.

[–] Mirodir@discuss.tchncs.de 32 points 1 year ago (2 children)

A pyramid is built bottom to top, not top to bottom. That's also one of the strengths of the ISO format. You can add/remove layers for arbitrary granularity and still have a valid date.

[–] Zagorath@aussie.zone 30 points 1 year ago (1 children)

Yeah, but people read top to bottom. The best way to do it would be to have upside down pyramids. With the biggest blocks at the top representing the biggest unit of time (YYYY) and the smallest blocks at the bottom representing seconds & smaller.

[–] catexaminer@beehaw.org 3 points 1 year ago

What do you think this is some sort of pyramid scheme?

[–] itslilith@lemmy.blahaj.zone 2 points 1 year ago

Offene Feldschlacht betritt den Raum

[–] lena 13 points 1 year ago* (last edited 1 year ago) (2 children)
[–] nesc@lemmy.cafe 29 points 1 year ago (2 children)

I get it, just pyramids are misleading, also year-month-day is better because resulting number always grows. 😺

[–] lena 6 points 1 year ago (1 children)

A bit out of context, but is your username and instance a reference to nescafe?

[–] nesc@lemmy.cafe 11 points 1 year ago (1 children)

Not really but now that you mentioned it, it will! 😄

[–] lena 4 points 1 year ago

That's an interesting coincidence

[–] Zagorath@aussie.zone 17 points 1 year ago (2 children)

2025-01-26T11:40:20, you mean?

[–] olympicyes@lemmy.world 5 points 1 year ago (1 children)

Hold on there pal that time zone is ambiguous. Did you mean 11:40:20 UTC? If so, don’t forget your Z!

[–] Zagorath@aussie.zone 1 points 1 year ago

I mean 11:40:20 in what NodaTime would call a "LocalDateTime". i.e., irrespective of the time zone.

(And incidentally, if you're working in C# I strongly recommend the NodaTime library. And even if you're not, I strongly recommend watching the lectures about dates and times by the NodaTime developer, who demonstrates a way of thinking about dates and times that is so much more thoughtful than what most standard libraries allow for without very careful attention paid by the programmer.)

[–] lena 2 points 1 year ago