parseISO returning wrong time on day of offset change
See original GitHub issueIn Germany the offset will change from +1 to +2 on March 29th. When using parseISO on a timestamp on this day the result is one hour off:
parseISO('2020-03-28T10:00:00') // Sat Mar 28 2020 10:00:00 GMT+0100
parseISO('2020-03-29T10:00:00') // Sun Mar 29 2020 11:00:00 GMT+0200
parseISO('2020-03-30T10:00:00') // Mon Mar 30 2020 10:00:00 GMT+0200
This happens on version 2.9.0
Anyone else ran into the same problem and has a potential fix for this?
EDIT: Just wanted to add that this happens on Chrome, Firefox and Edge Chromium
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Date-fns parseISO returning wrong date - javascript
I think it is just a timezone issue, try to append "T00:00" when you create your date object, when you don't specifies the...
Read more >How to parse ISO 8601 date in Swift
Learn how to parse ISO 8601 date with ISO8601DateFormatter. ... This can be problematic if you want to communicate date and time information ......
Read more >Moment.js | Guides
This section lays out some guidelines about how to correctly use the parser in your situation. Local vs UTC vs Offset. edit. Moment...
Read more >How to use the date-fns.parseISO function in ...
parseISO examples, based on popular ways it is used in public projects. ... task by offset const iter = obj => { if...
Read more >Working with dates and timezones in JavaScript: a survival ...
If we change the timezone setting on our computer to Oslo, ... Likewise, toISOString() always returns the date in UTC time, which you...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
just tried with the latest version 2.10.0. same result. returned dates are off by one hour
I created pr with a fix, but it uses completely another approach, anyone concerned please test it.