mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-22 13:09:26 +00:00
Fix calendar rrule until where event is fullday but rrule until has a non-0 time (#3782)
This fixes #3781 tests supplied see https://forum.magicmirror.builders/topic/19637/issue-with-outlook-recurring-events
This commit is contained in:
@@ -293,6 +293,13 @@ const CalendarFetcherUtils = {
|
||||
|
||||
event.start = rule.options.dtstart;
|
||||
|
||||
// if until is set, and its a full day event, force the time to midnight. rrule gets confused with non-00 offset
|
||||
// looks like MS Outlook sets the until time incorrectly for fullday events
|
||||
if ((rule.options.until !== undefined) && CalendarFetcherUtils.isFullDayEvent(event)) {
|
||||
Log.debug("fixup rrule until");
|
||||
rule.options.until = new Date(new Date(moment(rule.options.until).startOf("day").add(1, "day")).getTime());
|
||||
}
|
||||
|
||||
Log.debug("fix rrule start=", rule.options.dtstart);
|
||||
Log.debug("event before rrule.between=", JSON.stringify(event, null, 2), "exdates=", event.exdate);
|
||||
// fixup the exdate and recurrence date to local time too for post between() handling
|
||||
|
Reference in New Issue
Block a user