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

rrulestr returns incorrect dates in local timezone. #383

Open
iseff opened this issue Feb 3, 2020 · 1 comment
Open

rrulestr returns incorrect dates in local timezone. #383

iseff opened this issue Feb 3, 2020 · 1 comment

Comments

@iseff
Copy link

iseff commented Feb 3, 2020

Reporting an issue

Thank you for taking an interest in rrule! Please include the following in
your report:

  • [x ] Verify that you've looked through existing issues for duplicates before
    creating a new one
  • [ x] Code sample reproducing the issue. Be sure to include all input values you
    are using such as the exact RRule string and dates.
  • [x ] Expected output
  • [x ] Actual output
  • [x ] The version of rrule you are using
  • [x ] Your operating system
  • [x ] Your local timezone (run $ date from the command line
    of the machine showing the bug)

When using rrulestr with a recurrence that happens on day1 in a local timezone and day2 in UTC, it returns day0 in local timezone.

Input:

DTSTART:20200204T010000Z
RRULE:FREQ=WEEKLY;WKST=SU;BYDAY=MO,TH

Expected output:

[Mon Feb 03 2020 20:00:00 GMT-0500 (Eastern Standard Time), Thu Feb 06 2020 20:00:00 GMT-0500 (Eastern Standard Time), Mon Feb 10 2020 20:00:00 GMT-0500 (Eastern Standard Time), Thu Feb 13 2020 20:00:00 GMT-0500 (Eastern Standard Time), Mon Feb 17 2020 20:00:00 GMT-0500 (Eastern Standard Time), Thu Feb 20 2020 20:00:00 GMT-0500 (Eastern Standard Time), Mon Feb 24 2020 20:00:00 GMT-0500 (Eastern Standard Time), Thu Feb 27 2020 20:00:00 GMT-0500 (Eastern Standard Time), Mon Mar 02 2020 20:00:00 GMT-0500 (Eastern Standard Time), Thu Mar 05 2020 20:00:00 GMT-0500 (Eastern Standard Time), Mon Mar 09 2020 21:00:00 GMT-0400 (Eastern Daylight Time), Thu Mar 12 2020 21:00:00 GMT-0400 (Eastern Daylight Time), Mon Mar 16 2020 21:00:00 GMT-0400 (Eastern Daylight Time), Thu Mar 19 2020 21:00:00 GMT-0400 (Eastern Daylight Time), Mon Mar 23 2020 21:00:00 GMT-0400 (Eastern Daylight Time), ...]

Actual output:

[Wed Feb 05 2020 20:00:00 GMT-0500 (Eastern Standard Time), Sun Feb 09 2020 20:00:00 GMT-0500 (Eastern Standard Time), Wed Feb 12 2020 20:00:00 GMT-0500 (Eastern Standard Time), Sun Feb 16 2020 20:00:00 GMT-0500 (Eastern Standard Time), Wed Feb 19 2020 20:00:00 GMT-0500 (Eastern Standard Time), Sun Feb 23 2020 20:00:00 GMT-0500 (Eastern Standard Time), Wed Feb 26 2020 20:00:00 GMT-0500 (Eastern Standard Time), Sun Mar 01 2020 20:00:00 GMT-0500 (Eastern Standard Time), Wed Mar 04 2020 20:00:00 GMT-0500 (Eastern Standard Time), Sun Mar 08 2020 21:00:00 GMT-0400 (Eastern Daylight Time), Wed Mar 11 2020 21:00:00 GMT-0400 (Eastern Daylight Time), Sun Mar 15 2020 21:00:00 GMT-0400 (Eastern Daylight Time), Wed Mar 18 2020 21:00:00 GMT-0400 (Eastern Daylight Time), Sun Mar 22 2020 21:00:00 GMT-0400 (Eastern Daylight Time), ...]
@KrisLau
Copy link

KrisLau commented Dec 11, 2023

did you ever figure this out? I'm having the same issue but only with timezones outside of the us

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