From 2e789795ed11c816550b6a3ce88fe92a360ede9c Mon Sep 17 00:00:00 2001 From: Matt Van Horn Date: Fri, 17 Apr 2026 04:53:43 -0400 Subject: [PATCH] fix: preserve all-day event dates in Nextcloud calendar integration (#5523) Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> Co-authored-by: Meier Lukas --- .../src/nextcloud/nextcloud.integration.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/integrations/src/nextcloud/nextcloud.integration.ts b/packages/integrations/src/nextcloud/nextcloud.integration.ts index ff41d8300..f14bd11d7 100644 --- a/packages/integrations/src/nextcloud/nextcloud.integration.ts +++ b/packages/integrations/src/nextcloud/nextcloud.integration.ts @@ -113,7 +113,9 @@ export class NextcloudIntegration extends Integration implements ICalendarIntegr // next actually returns undefined when there are no more occurrences // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition while ((next = iterator.next())) { - const nextStartDate = next.convertToZone(ICAL.Timezone.utcTimezone).toJSDate(); + const nextStartDate = next.isDate + ? next.toJSDate() + : next.convertToZone(ICAL.Timezone.utcTimezone).toJSDate(); if (nextStartDate > end) break; const nextEndDate = new Date(nextStartDate.getTime() + durationMs); if (nextEndDate < start) continue; @@ -121,7 +123,11 @@ export class NextcloudIntegration extends Integration implements ICalendarIntegr startDates.push(nextStartDate); } } else { - startDates = [veventObject.startDate.convertToZone(ICAL.Timezone.utcTimezone).toJSDate()]; + startDates = [ + veventObject.startDate.isDate + ? veventObject.startDate.toJSDate() + : veventObject.startDate.convertToZone(ICAL.Timezone.utcTimezone).toJSDate(), + ]; } return startDates.map((startDate) => {