rrule icon indicating copy to clipboard operation
rrule copied to clipboard

Exdates returning UTC date without TZID offset

Open Lawton opened this issue 1 year ago • 3 comments

Reporting an issue

I am finding that an rruleset with exclusion dates returns dates without the offset of the timezone within the rruleset.

Example

var r = rrule.rrulestr('DTSTART;TZID=America/New_York:20231114T220000\nRRULE:UNTIL=20231118T220000;INTERVAL=1;FREQ=DAILY\nEXDATE;TZID=America/New_York:20231116T220000');
r.all()
/**
output : [
  2023-11-15T03:00:00.000Z,
  2023-11-16T03:00:00.000Z,
  2023-11-18T03:00:00.000Z,
  2023-11-19T03:00:00.000Z
] ✅ 
*/
r.exdates()
// expected: [ 2023-11-17T03:00:00.000Z ]

// actual: [ 2023-11-16T22:00:00.000Z ]

rrules version: 2.7.2

operating system: macOS 14

timezone: EST

Is this expected behaviour? It seems strange that exdates are not consistent with the instances. Thanks!


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)

Lawton avatar Nov 14 '23 20:11 Lawton

I noticed this as well.

dkelsen avatar Dec 09 '23 19:12 dkelsen

Same

sdotson avatar Mar 25 '24 18:03 sdotson

+1 having the same issue :(

vkartaviy avatar Jun 04 '24 22:06 vkartaviy