We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
toISOString()
Describe the bug
// 'Europe/Vilnius' timezone => GMT+2, DST+1 // zone initialization - ok dayjs.tz('2022-01-01T00:00:00.000Z', 'Europe/Vilnius').format() // OUTPUT: '2022-01-01T00:00:00+02:00' ✅ dayjs.tz('2022-01-01T00:00:00.000Z', 'Europe/Vilnius').toISOString() // OUTPUT: '2021-12-31T22:00:00.000Z' ✅ // zone conversion - fails dayjs.utc('2021-12-31T22:00:00.000Z').tz('Europe/Vilnius').format() // OUTPUT: '2022-01-01T00:00:00+02:00' ✅ dayjs.utc('2021-12-31T22:00:00.000Z').tz('Europe/Vilnius').toISOString() // OUTPUT: '2021-12-31T23:00:00.000Z' ❌ // EXPECTED: '2021-12-31T22:00:00.000Z'
FIY: moment.js handles this properly.
Information
v1.10.7
macOS Big Sur
The text was updated successfully, but these errors were encountered:
I am seeing similar 1 hour off issues with timezones (compared to momentjs). Central time is -5/-6 but dayjs is giving 7 hour offset?
dayjs('2021-01-01').tz('America/Chicago').toISOString() '2021-01-01T07:00:00.000Z' moment('2021-01-01').tz('America/Chicago').toISOString() '2021-01-01T06:00:00.000Z'
Sorry, something went wrong.
dayjs.tz
No branches or pull requests
Describe the bug
FIY: moment.js handles this properly.
Information
v1.10.7
macOS Big Sur
The text was updated successfully, but these errors were encountered: