Closed leider closed 10 years ago
I suspect this may have something to do with your timezone (although we use UTC for all recurrence calculations.) Is it possible that March 1st does not exist in your timezone? =)
It definitely is a time zone problem. When I go west the errors disappear. So you could also experience failing tests by setting your machine's time zone east of Greenwich.
Am 21.11.2013 um 02:29 schrieb James Emerton notifications@github.com:
I suspect this may have something to do with your timezone (although we use UTC for all recurrence calculations.) Is it possible that March 1st does not exist in your timezone? =)
— Reply to this email directly or view it on GitHub.
Diving throughout the code for some time. it is hard tp see where local dates are used or where utc comes in. There is a lot of stuff done manually that could be much easier by using http://momentjs.com/timezone/
Perhaps you should have a closer look at these.
Also, are you sure to always have UTC stuff when you think you do? UTC is a way to display a Date. Javascript Dates are UTC by default. The only thing that is timezone aware is the representation!
I see the same behaviour when I try to use the RRule.getNextOccurances() with a COUNT rule
By debugging through the code I noticed several issues in RRule.js with timezones, it seems to me that the RRule.to_utc_date is actually correcting in the wrong direction whenever the system timezone is not UTC - on the other hand I don't really understand the code there, so I might be wrong with that analysis.
Our servers run on UTC so this not an issue there - but unittests run on developers laptops in all kinds of timezones...
I can also see 4 failing unittests whenever my System Timezone is not UTC, as soon as I switch the laptops timezone to UTC all tests pass.
I tried fixing this, but I keep breaking other tests
Transcript: