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

Decide how to deal with far-off DST Transition points #209

Open
12wrigja opened this issue Jan 14, 2023 · 3 comments
Open

Decide how to deal with far-off DST Transition points #209

12wrigja opened this issue Jan 14, 2023 · 3 comments

Comments

@12wrigja
Copy link
Contributor

Context: 20ef40ba6a0898fb477d16d198dbb1f2d50f00c4

When pulling in new commits from the proposal repo, I noticed that this commit's text mentions that it might be unsuitable for production code and so I skipped over it.

Though the current code is slow, maybe there are other ways to speed this up?

@ptomato
Copy link
Contributor

ptomato commented Jan 14, 2023

I think this is best solved by moving away from the "bisection" method to find DST transition points - probably we'd need a source of time zone data other than Intl.DateTimeFormat. See tc39/proposal-temporal#1370 for an incomplete attempt at this.

@justingrant
Copy link
Contributor

I don't think we should skip that commit, because the alternative is worse: an easy way to DoS a server that uses this API. Maybe extend to 5 years or 7 years? Real world time zone changes shouldn't occur further in advance than 5-7 years.

@justingrant
Copy link
Contributor

And for a polyfill, I don't think we can get away with shipping the whole tzdb. Too big for browser use!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants