-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: time zone by offset #13
Comments
On a related note, the "Global Coordinates" time zone system seems useless:
What moment in time is "2021-11-7/01:30/40.71/-74.01"? It could be NYC, 30 minutes before the DST switch, or an hour later, 30 minutes after it. |
Offsets are supported using area
True, it's not common for small companies, but large companies like Google do use coordinate based timezones because there are areas on the planet that don't have official time zones at various points in time, or need to have official time zones retroactively applied.
The same could be said of |
Hmm, OK. I'd suggest including an example of an offset in the documentation, because that's a very common case. I spent a while digging through the "Structural Spec" and "Compact Time" and I had no idea it was possible. (I am, clearly, not a time zone expert.) Also, this is still only a spec so far, not implementation, right? This doesn't seem to work yet:
And to clarify, "Etc/GMT-5" is just a hardcoded name string in the TZ database, not a syntax for offsets, correct? So if someone from Mumbai sent me the ISO-8601 timestamp "1994-11-05T08:15:30+05:30", there's no "Etc/GMT+5:30" name that could be used in CE for that. I don't have any specific use case today, so this isn't a big deal to me yet. I'm just not sure how I'm going to implement it. It seems like I'll have to end up doing something like:
|
Hmm looks like the parser is incorrectly tossing out the To your second point, it wouldn't work with I'll modify the spec on the area/location field to support a special form that starts with |
Sorry for the mess. I didn't mean to turn CE timestamps upside down for you. I just wanted to get something simple working quickly, and all the timestamps I've got here happen to have offsets. I've got much bigger monkey wrenches to throw into CE later. :-) |
No, this is a good thing! I've been starved for critiques of the format, and it's impossible for one person to get it 100% correct in a vacuum. Hell, not even 90%. Keep it coming, and thanks!!! |
CE timestamps can have a time zone, which is currently defined as either "Area/Location" (political) or "Global Coordinates" (lat/lon). There's also special values "Zero" (UTC) and "Local" ("to be interpreted as if in the time zone of the observer").
There doesn't seem to be any way to declare a time zone by offset from UTC, alone, which is how nearly all the timestamps that I encounter are given.
For example, W3C's note on Date and Time Formats gives the sample timestamp "1994-11-05T08:15:30-05:00". I don't think there's any way to encode this in CE.
All other serialization formats in the CE format comparison table which support time zones (ASN.1, CBOR) support offsets.
The text was updated successfully, but these errors were encountered: