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 dates #209

Closed
jimmywarting opened this issue Apr 16, 2018 · 9 comments
Closed

Wrong dates #209

jimmywarting opened this issue Apr 16, 2018 · 9 comments

Comments

@jimmywarting
Copy link

I was building a calendar in react-native and notices something strange

When i run this on iOS

console.log(
  rrulestr('FREQ=DAILY;DTSTART=20180416T070000Z;INTERVAL=2;WKST=MO')
    .between(
      new Date("2018-10-24T22:00:00.000Z"),
      new Date("2018-11-03T00:00:00.000Z")
    )
)

I got the following:

Array [
  2018-10-25T07:00:00.000Z,
  2018-10-27T07:00:00.000Z,  <--
  2018-10-28T08:00:00.000Z,  <--
  2018-10-30T08:00:00.000Z,
  2018-11-02T08:00:00.000Z,
]

Where as i run it in console over at https://jakubroztocil.github.io/rrule/
i got a more correct result:

Array [
  2018-10-25T07:00:00.000Z,
  2018-10-27T07:00:00.000Z, <--
  2018-10-29T08:00:00.000Z, <--
  2018-10-31T08:00:00.000Z,
  2018-11-02T08:00:00.000Z,
]

I'm using rrule v2.2.9
everything else did look correct from 2018-04-16 upon till this point

@jimmywarting
Copy link
Author

Even run this in the npm playground: https://runkit.com/embed/1lgceq9e7rm0

@jimmywarting
Copy link
Author

Think it might be related to #157

@jimmywarting
Copy link
Author

using @2.2.0 instead of @2.2.8 works

@Jogai
Copy link

Jogai commented May 7, 2018

See also #201

@chrishanyu
Copy link

We ran into this issue also. The problem seems to be caused by the daylight saving shift in November. Downgrading to @2.2.0 from @2.2.9 worked for us too.

@scoutkirkolson
Copy link

I got wrong dates as well with @2.2.9 When setting frequency to weekly and weekday to thursday I got dates that were on wednesdays! Switching back to @2.2.0 worked for me.
I'm in GMT+2 (Middle Europe, daylights saving)

@pzhuk
Copy link

pzhuk commented Jul 14, 2018

Same here, timezone GMT+3(summertime Kyiv/Ukraine)
Same rule: FREQ=WEEKLY;BYDAY=FR;DTSTART=20180713T060000Z;UNTIL=20180727T060000Z
returns different results in Firefox and Chrome, where Chrome seems taking BYDAY=BYDDAY-1

Fallback from 2.2.9 to 2.2.0 fix the issue

@davidgoli
Copy link
Collaborator

@jimmywarting @chrishanyu @scoutkirkolson @pzhuk I believe this has been fixed in 2.3.3. Please reopen if you continue to have any issues.

@markkdev
Copy link

markkdev commented Sep 3, 2020

We experienced this issue and reverting to 2.2.0 fixed it

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

7 participants