Fixed that the calendar iCal export was broken when having "Track date only" chores (fixes #1547)

This commit is contained in:
Bernd Bestel
2021-07-24 10:24:21 +02:00
parent f47ca963ab
commit 8225215e39
2 changed files with 3 additions and 1 deletions

View File

@@ -0,0 +1,2 @@
- Fixed that the upgrade failed when having "> 2 times duplicate" (means the same barcode was added more than 2 times) product barcodes
- Fixed that when having any "Track date only" chore on the calendar, the iCal export was broken

View File

@@ -30,7 +30,7 @@ class CalendarApiController extends BaseApiController
if ($event['date_format'] === 'date' || (isset($event['allDay']) && $event['allDay']))
{
// All-day event
$date = new Date(\DateTimeImmutable::createFromFormat('Y-m-d', $event['start']));
$date = new Date(\DateTimeImmutable::createFromFormat('Y-m-d', substr($event['start'], 0, 10)));
$vEventOccurrence = new SingleDay($date);
}
else