-
-
Notifications
You must be signed in to change notification settings - Fork 544
Enhancement: Native timezone support for recurring events #646
Copy link
Copy link
Open
Description
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!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels