this post was submitted on 12 Dec 2023
630 points (95.1% liked)
Memes
45660 readers
1230 users here now
Rules:
- Be civil and nice.
- 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
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
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.
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."
IMO, ISO 8601 is better for computers, people working with multiple time zones, or critical logging.
RFC 3339 is better used colloquially, while still remaining unambiguous for the use cases that most people use dates and times in.
I'd rather have an explicit time zone any time a datetime is being passed around code as a string. Communicating it to a human is relatively safe since even if there's a mistake, it's directly visible. Before that last step, incorrect time zone parsing or implicit time zone assumptions in code that was written by "who knows" in the year "who knows" can be really annoying.
I couldn’t agree more!