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

Wrong results for DIFF when using a custom timezone #5839

Open
jul1ans opened this issue Feb 25, 2021 · 0 comments
Open

Wrong results for DIFF when using a custom timezone #5839

jul1ans opened this issue Feb 25, 2021 · 0 comments

Comments

@jul1ans
Copy link

jul1ans commented Feb 25, 2021

When I calculate the diff between two dates with a custom timezone, there are wrong results when I use days format.
This only happens if start and end date were in different summer / winter timezones (but I want to force it to calculate the diff like if there is no summer / winter time)

Here is a dummy code:
https://codepen.io/jul1ans/pen/LYbegrp?editors=0010

When I use the hours diff and calculate the days manually, it works correct.
Math.floor(totalHours / 24)

My specs:

Thu Feb 25 2021 14:07:59 GMT+0100
25.2.2021, 14:07:59
-60
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36
2.29.1

Thank you in advance

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