Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions modules/default/calendar/calendarfetcherutils.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@ const CalendarFetcherUtils = {
const searchFromDate = pastLocalMoment.clone().subtract(Math.max(durationInMs, oneDayInMs), "milliseconds").toDate();
const searchToDate = futureLocalMoment.clone().add(1, "days").toDate();

// For all-day events, extend "until" to end of day to include the final occurrence
if (isFullDayEvent && rule.options?.until) {
rule.options.until = moment(rule.options.until).endOf("day").toDate();
}

const dates = rule.between(searchFromDate, searchToDate, true) || [];

// Convert dates to moments in the event's timezone.
Expand Down Expand Up @@ -313,7 +308,12 @@ const CalendarFetcherUtils = {
let recurringEventStartMoment = startMoment.clone().tz(CalendarFetcherUtils.getLocalTimezone());
let recurringEventEndMoment = recurringEventStartMoment.clone().add(durationMs, "ms");

const dateKey = recurringEventStartMoment.tz("UTC").format("YYYY-MM-DD");
// For full-day events, use local date components to match node-ical's getDateKey behavior
// For timed events, use UTC to match ISO string slice
const isFullDay = CalendarFetcherUtils.isFullDayEvent(event);
const dateKey = isFullDay
? recurringEventStartMoment.format("YYYY-MM-DD")
: recurringEventStartMoment.tz("UTC").format("YYYY-MM-DD");

// Check for overrides
if (curEvent.recurrences !== undefined) {
Expand Down
20 changes: 10 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"ipaddr.js": "^2.3.0",
"moment": "^2.30.1",
"moment-timezone": "^0.6.0",
"node-ical": "^0.23.0",
"node-ical": "^0.23.1",
"nunjucks": "^3.2.4",
"pm2": "^6.0.14",
"socket.io": "^4.8.3",
Expand Down