• ISO 8601 is paywalled
  • RFC allows a space instead of a T (e.g. 2020-12-09 16:09:…) which is nicer to read.
You are viewing a single thread.
View all comments View context
10 points

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.

permalink
report
parent
reply
12 points

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

permalink
report
parent
reply
2 points

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.

permalink
report
parent
reply
4 points

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.

permalink
report
parent
reply
2 points

There’s a new RFC in the pipeline that will address this.

It’s already been approved, just needs to slooowly crawl its way theough the final publication queue.

permalink
report
parent
reply
1 point

Thanks for the link. Reading it gave me a headache. Not because of the proposal, but because of the very clear explanation it includes of just how annoying time zones are. I never even thought about the fact that a time relative to a UTC timestamp isn’t uniquely associated with another UTC timestamp because the local UTC offset can change. It’s obvious when you say it, but now I’m wondering if I have more time zone bugs somewhere.

permalink
report
parent
reply

Memes

!memes@lemmy.ml

Create post

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.

Community stats

  • 11K

    Monthly active users

  • 13K

    Posts

  • 288K

    Comments