]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix display of DTEND for multi-day all-day event 19219/head
authorGeorg Ehrke <developer@georgehrke.com>
Thu, 30 Jan 2020 14:02:16 +0000 (15:02 +0100)
committerGeorg Ehrke <developer@georgehrke.com>
Thu, 30 Jan 2020 14:02:16 +0000 (15:02 +0100)
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
apps/dav/lib/CalDAV/Schedule/IMipPlugin.php

index ef4255b22c0aee2e702828227d407b83d71de39f..982c579d3bb96d6561302be23be1d86127071e86 100644 (file)
@@ -440,6 +440,10 @@ class IMipPlugin extends SabreIMipPlugin {
                                return $l10n->l('date', $dtstartDt, ['width' => 'medium']);
                        }
 
+                       // DTEND is exclusive, so if the ics data says 2020-01-01 to 2020-01-05,
+                       // the email should show 2020-01-01 to 2020-01-04.
+                       $dtendDt->modify('-1 day');
+
                        //event that spans over multiple days
                        $localeStart = $l10n->l('date', $dtstartDt, ['width' => 'medium']);
                        $localeEnd = $l10n->l('date', $dtendDt, ['width' => 'medium']);