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

ZonedDateTime.from() has inconsistent results. #49

Open
massimilianobellan opened this issue Nov 11, 2024 · 0 comments
Open

ZonedDateTime.from() has inconsistent results. #49

massimilianobellan opened this issue Nov 11, 2024 · 0 comments

Comments

@massimilianobellan
Copy link

Creating a ZonedDateTime doesn't work properly in distant futures.

const date1 = Temporal.ZonedDateTime.from({ year: 2033, month: 6, day: 10, timeZone: 'Europe/Berlin' }).toString();
const date2 = Temporal.ZonedDateTime.from({ year: 2034, month: 6, day: 10, timeZone: 'Europe/Berlin' }).toString();

console.log(date1) //2033-06-10T00:00:00+02:00[Europe/Berlin]
console.log(date2) //2034-06-10T00:00:00+01:00[Europe/Berlin]

The timezone offset should not be different. This wrong result seems to be consistent with any year beyond and including 2034.

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

1 participant