Skip to content

Enhancement: Native timezone support for recurring events #646

@naringst

Description

@naringst

I'm currently implementing recurring events with RRule and need to handle timezone-specific repetitions. Currently, when setting a recurring event for 11:32 AM KST with tzid: 'Asia/Seoul', RRule doesn't automatically generate recurrences in Korean local time. Instead, I have to manually adjust the times by calculating UTC offsets.

Current workaround:

// Creating RRule with local time
const koreanEvent = new RRule({
 dtstart: datetime(
   localDate.getFullYear(),
   localDate.getMonth() + 1,
   localDate.getDate(), 
   11, // 11:32 KST
   32,
 ),
 tzid: 'Asia/Seoul',
 ...options
});

// Processing results
const dates = koreanEvent.all().map(utcDate => {
 return moment.tz(utcDate, 'Asia/Seoul')
   .subtract(utcOffset, 'hours')
   .toDate();
});

Feature request: Could RRule natively handle timezone-aware recurrences? For example, if I set:

new RRule({
  dtstart: someDateTime,
  tzid: 'Asia/Seoul',
  ...otherOptions
})

It would be helpful if RRule could directly return dates in the specified timezone without manual offset calculations.
Please let me know if I'm misunderstanding any part of RRule's timezone functionality. Thank you for considering this request!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions