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

parse adds one hour to ever date before DST change (v1.30.1) #1500

Open
ngehlert opened this issue Oct 24, 2019 · 2 comments
Open

parse adds one hour to ever date before DST change (v1.30.1) #1500

ngehlert opened this issue Oct 24, 2019 · 2 comments
Labels

Comments

@ngehlert
Copy link

ngehlert commented Oct 24, 2019

// Adjust time when it's coming from DST

Hi
can you explain why you add one hour to the date when the next day has a DST change? Isn't the parse value wrong then?

I put together a stackblitz example:
https://stackblitz.com/edit/date-fns-playground-grl7an?file=app.ts
Notice the dates after 2019-10-26 01:00
e.g.

parse 2019-10-26T06:15:00+02:00:     Sat Oct 26 2019 06:15:00 GMT+0200 (Mitteleuropäische Sommerzeit)
parse 2019-10-26T06:15:00:  Sat Oct 26 2019 07:15:00 GMT+0200 (Mitteleuropäische Sommerzeit)

My current timezone: CET

@emelineL
Copy link

I'm facing the same issue, parsed dates on the 26th of October are off by one hour.

@kronthto
Copy link

Same issue: Seems to be introduced with #1003 / #1005 - it takes the next day into consideration with those changes.

Wrote a comment there first then saw this issue: #1003 (comment)

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

No branches or pull requests

4 participants