-
Notifications
You must be signed in to change notification settings - Fork 183
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
Calculate TimeZoneInput from timestamps #533
Comments
Discussion 2021-03-12:
|
I think we should seriously consider making a TimeZone class with a similar API as Temporal.TimeZone, which has two benefits:
Read more: https://github.com/tc39/proposal-temporal/blob/main/docs/timezone.md CC @nordzilla |
I will incorporate this into Friday's discussion. |
Note that we will want to support both directions. In ICU these are |
Fixed by #5349 |
Oh sorry, I only saw the IXDTF string in the issue and didn't read it in enough detail.
I don't think we want to do this. Going from timestamp + zone identifier to datetime + |
It is only in the last 14 days that my thinking has shifted toward us taking a path that avoids the full TZDB in ICU4X. I think we should still have the TC discussion to decide on whether this opinion is shared with others. |
Pending #528, we will likely require time zones to be fully resolved into GMT offsets and metazones. However, the reality is that people will want to hand ICU4X a timestamp, and get a localized result out the other end. Our organization has the expertise to implement these conversions, and I think we should release libraries to perform them. Of course, they should be modular and stand to the side of ICU4X.
What we should implement is, I think, rather straightforward:
* I would like to take the BCP-47 time zone identifier as input because I want to encourage the use of the small, fixed-width, lightweight types within ICU4X. However, since most people will be using IANA identifiers, we should also provide a library on the side that can convert from IANA identifier to BCP-47 identifier.
We should also think about how this relates to the ISO-8601 and Temporal data models. In particular, we may want to match our data model to strings such as:
2021-03-05T07:49:02Z
is a timestamp in UTC2021-03-05T00:49:02-0700
is the same timestamp but with a GMT offset2021-03-05T00:49:02-0700[America/Denver]
is a zoned datetime; the GMT offset should serve as a hint to help resolve potential conflicts near variant transitions (daylight savings time)In the end, we also need the ISO date to feed into #534, so the time zone resolution layer should make sure to retain that information when possible.
The text was updated successfully, but these errors were encountered: