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

Number of days is wrong when it spans daylight savings time #481

Open
kmccurley opened this issue Oct 15, 2019 · 0 comments
Open

Number of days is wrong when it spans daylight savings time #481

kmccurley opened this issue Oct 15, 2019 · 0 comments
Labels
Status: needs triage Issue has not been properly analyzed yet.

Comments

@kmccurley
Copy link

kmccurley commented Oct 15, 2019

We discovered today that when trying to select a 5 day period spanning Nov. 3rd, it shows an error of "Date range should not be more than 5 days". The data at the time of calculation on line 1755 is:
opt.end = 1572809294319
opt.start = 1572460094319

The calculation on line 1755 then gives:
(opt.end - opt.start) /86400000 = 4.041666666666667

This is then rounded up, 1 is added to it, resulting in 6 days rather than 5. The problem is due to the fact that Nov 4 is the day after daylight savings time change, so we get 0.041666666666667 extra days (or one hour).

This error can be recreated on the demo page with the config that allows a selection between 3 and 7 days and the range spans a day when we advance clocks by one hour.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: needs triage Issue has not been properly analyzed yet.
Projects
None yet
Development

No branches or pull requests

2 participants