The use of colon in timestamps is incompatible with several filesystems and this just drives me nuts.
RFC 3339 vs. ISO 8601
81–90 of 177 posts
Re: RFC 3339 vs. ISO 8601
#82I often come across a string and don’t recognize the format and would love to just supply a bunch of examples and make a best guess.
Re: RFC 3339 vs. ISO 8601
#83https://stackoverflow.com/questions/127803/how-do-i-parse-an...
Re: RFC 3339 vs. ISO 8601
#84Re: RFC 3339 vs. ISO 8601
#85Does anyone know of a website that lets you paste in date strings and it will show you all the possible formats they adhere to along with their format strings? I often come across a string and don’t recognize the format and would love to just supply a bunch of examples and make a best guess.
Re: RFC 3339 vs. ISO 8601
#86Earlier quoted context omitted.
If you carry the string '2021-10-24' across countries borders, the moments in time that it represents change as well. That makes doesn't make it a bad time interchange format for certain use cases, though. Just like everything else with time, one must be aware of caveats. Those include timezones, leap periods, culture, DST, formats, legislation (modern and ancient), etc.
But it overlaps. It's off, but less than 100% off. "2021-Q1" can be a completely different and non-overlapping range between regions, and even between companies in the same region.
Re: RFC 3339 vs. ISO 8601
#87…and none of these do timezones properly! If your birthday party is: 2022-05-01T16:00+1000 …but tomorrow’s government abolishes daylight savings time, your birthday event has to change to: 2022-05-01T16:00+0900 . If you’d just said: 2022-05-01T16:00 Asia/Eastern_Siberia …you’d be fine and everyone will show up at the right time.
It’s ugly whatever you do, unless you use coordinates to specify your time zone (then it’s just hell to decode).
Re: RFC 3339 vs. ISO 8601
#88Earlier quoted context omitted.
That’s still ambiguous, since the government might only abolish DST for part of Asia/Eastern_Siberia, causing the zone to split.
I guess we could just put the lat/long and let people figure it out? But that still doesn't fix the time when the time zone does change... So using UTC is a simple fix
Eg: Work at the local library is always 9 to 5 (again “local time”) and you mean precisely one hour after work lets up, regardless of whatever daylight savings or time zone changes occur between now and then.
You need to use either a naive date-time representation coupled with the additional context (“my time”) or use something like lat/long. Or you’re lucky and you live in or near enough to a major metropolis that has its own TZDB entry and it’s virtually impossible for your local time to diverge from that TZ, so you can use that instead (eg you live just outside NYC proper so you use America/New_York as your time zone).
Re: RFC 3339 vs. ISO 8601
#89Earlier quoted context omitted.
It's correct. Omission means 2021-10-2411:02:03Z, not replacing it with a space instead.
Omitting the hyphens and colons is allowed too (IIRC), so I suppose omitting the T is intended for cases like 20211024110203Z — which IMO is a sensible format when there's no ambiguity that this is a date-time.
Re: RFC 3339 vs. ISO 8601
#90Earlier quoted context omitted.
There are some non-trivial changes between the draft standards and the final ISO 8601:2019-1 standard, one of which relates to making the use of T stricter, and the mentioned provision was removed. Regardless, ISO 8601 has generally discouraged using spaces within expressions. From ISO 8601:2004, section 3.4.1: > Unless explicitly allowed by this International Standard the character "space" shall not be used in the r…
> There are some non-trivial changes between the draft standards and the final ISO 8601:2019-1 standard, one of which relates to making the use of T stricter, and the mentioned provision was removed Yes, and? The draft standard is the pretty much everyone actually uses. For most purposes it's the "real" one.