From 8225215e393d7e977c50c5ae98caeb0429832820 Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Sat, 24 Jul 2021 10:24:21 +0200 Subject: [PATCH] Fixed that the calendar iCal export was broken when having "Track date only" chores (fixes #1547) --- changelog/63_UNRELEASED_xxxx.xx.xx.md | 2 ++ controllers/CalendarApiController.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelog/63_UNRELEASED_xxxx.xx.xx.md diff --git a/changelog/63_UNRELEASED_xxxx.xx.xx.md b/changelog/63_UNRELEASED_xxxx.xx.xx.md new file mode 100644 index 00000000..c81eb25a --- /dev/null +++ b/changelog/63_UNRELEASED_xxxx.xx.xx.md @@ -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 diff --git a/controllers/CalendarApiController.php b/controllers/CalendarApiController.php index 3c48d732..609913ba 100644 --- a/controllers/CalendarApiController.php +++ b/controllers/CalendarApiController.php @@ -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