Merge pull request #19308 from nextcloud/backport/19219/stable18

[stable18] Fix display of DTEND for multi-day all-day event
This commit is contained in:
Roeland Jago Douma 2020-02-05 22:22:12 +01:00 committed by GitHub
commit ea6e4cb033
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -440,6 +440,10 @@ class IMipPlugin extends SabreIMipPlugin {
return $l10n->l('date', $dtstartDt, ['width' => 'medium']); 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 //event that spans over multiple days
$localeStart = $l10n->l('date', $dtstartDt, ['width' => 'medium']); $localeStart = $l10n->l('date', $dtstartDt, ['width' => 'medium']);
$localeEnd = $l10n->l('date', $dtendDt, ['width' => 'medium']); $localeEnd = $l10n->l('date', $dtendDt, ['width' => 'medium']);