Skip to content
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

Should Temporal ship a TAI and/or GPS time zone? (or document how to build in a cookbook sample?) #900

Open
justingrant opened this issue Sep 14, 2020 · 5 comments
Labels
documentation Additions to documentation
Milestone

Comments

@justingrant
Copy link
Collaborator

While fielding replies to my tweet about https://yourcalendricalfallacyis.com/ , I noticed that @ryzokuken had already built a custom time zone for TAI, which (as I naively understand it) is the same as UTC but without leap seconds. https://github.com/ryzokuken/temporal-tai/blob/master/index.mjs

It seems like a fairly simple implementation. Should Temporal ship with a TAI time zone (or also a GPS time zone?) so folks who want better leap second support can get it without rolling their own?

If not, are these two good candidates for cookbook samples?

BTW, there was already some feedback about this a while ago: #133

I admit I don't know much about leap seconds (@gibson042 knows a lot more) so this may not be a helpful suggestion-- but at least wanted to capture it here.

@justingrant
Copy link
Collaborator Author

related: #893

@ptomato
Copy link
Collaborator

ptomato commented Sep 14, 2020

I think cookbook samples are a good idea, and a separate library (the same kind of thing that @pipobscure mentioned when we were talking about microformat parsing in the last meeting)

@gibson042
Copy link
Collaborator

temporal-tai doesn't seem to work, and to be honest I'm not sure what to expect from a "TAI" time zone, given that TAI is basically "more absolute than Absolute" rather than a normal time zone in which calendar dates and times have well-defined meaning. I guess each leap second would introduce a new offset rule such that e.g. Temporal.DateTime.from("2016-01-01T00:00:37").toAbsolute(customTimeZones.TAI).toString() is "2016-01-01T00:00:01Z" and Temporal.DateTime.from("2018-01-01T00:00:37").toAbsolute(customTimeZones.TAI).toString() is "2018-01-01T00:00Z"?? I see lots of potential for mistakes, especially given the lack of correspondence when there is no Absolute value for a TAI date and time of day.

Regardless, I very much support adding this to the cookbook.

@ptomato ptomato added the documentation Additions to documentation label Sep 17, 2020
@ptomato ptomato added this to the Stable proposal milestone Sep 17, 2020
@ptomato ptomato added spec-text Specification text involved non-prod-polyfill THIS POLYFILL IS NOT FOR PRODUCTION USE! and removed non-prod-polyfill THIS POLYFILL IS NOT FOR PRODUCTION USE! spec-text Specification text involved labels Sep 18, 2020
@ptomato
Copy link
Collaborator

ptomato commented Oct 19, 2020

Cookbook example to be written after the freeze and before Stage 3

@ptomato
Copy link
Collaborator

ptomato commented Jan 13, 2021

On further reflection this isn't a requirement for Stage 3. To be done later.

@ptomato ptomato modified the milestones: Stage 3, Next Jan 13, 2021
@ptomato ptomato self-assigned this Feb 19, 2021
@ptomato ptomato modified the milestones: Next, Post Stage 4 Dec 8, 2022
@ptomato ptomato removed their assignment Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants