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

DST bug #161

Open
kas84 opened this issue Sep 28, 2017 · 1 comment
Open

DST bug #161

kas84 opened this issue Sep 28, 2017 · 1 comment

Comments

@kas84
Copy link

kas84 commented Sep 28, 2017

Hi,
I am facing this issue where my I have an event on november 1st (when seeing it from monthview on october) that makes the event seem like two (I am guessing due to DST)

Debugging the code, I see that timeDifferenceStart is 37.083333333333336 and timeDifferenceEnd is 38.04165509259259.

index is Math.floor of timeDifferenceStart so 37.
timeDifferenceEnd - eps is 38.040655092592594

so when iterating like this...

while (index < timeDifferenceEnd - eps) 

And that it's why it's two days instead of one as it should be.

So what is eps and why is eps=0.001 on monthview?

@twinssbc
Copy link
Owner

@kas84 eps is for handling the number precision. Because in JavaScript, it's common to get below result
0.2 + 0.4 = 0.6000000000000001
It will leads to not equal result. That's why I use eps.
May I know what's your startTime, endTime and time zone?

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