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

Does this library considers day light saving for time zones? #5

Open
dulajra opened this issue Dec 6, 2018 · 1 comment
Open

Does this library considers day light saving for time zones? #5

dulajra opened this issue Dec 6, 2018 · 1 comment

Comments

@dulajra
Copy link

dulajra commented Dec 6, 2018

No description provided.

@mattdodge
Copy link

It does.

You can also test this yourself, something like this

const { convertToTimeZone } = require('date-fns-timezone')

convertToTimeZone("2019-08-01T03:14:00Z", {timeZone: "US/Pacific"}) + ""
// 'Wed Jul 31 2019 20:14:00 GMT-0700 (Pacific Daylight Time)'

convertToTimeZone("2019-12-01T03:14:00Z", {timeZone: "US/Pacific"}) + ""
// 'Sat Nov 30 2019 19:14:00 GMT-0800 (Pacific Standard Time)'

Notice the Daylight/Standard differences as well as the difference in offset hours whether it's daylight saving time or not.

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

2 participants