From f5025bb5782f5b2d00b97b26f7877197078366f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20L=27hopital?= Date: Sat, 19 Mar 2022 08:52:17 +0100 Subject: [PATCH] [icalendar] Adding ability to handle events without DTEND (#12482) Signed-off-by: clinique Signed-off-by: Andras Uhrin --- .../internal/logic/BiweeklyPresentableCalendar.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bundles/org.openhab.binding.icalendar/src/main/java/org/openhab/binding/icalendar/internal/logic/BiweeklyPresentableCalendar.java b/bundles/org.openhab.binding.icalendar/src/main/java/org/openhab/binding/icalendar/internal/logic/BiweeklyPresentableCalendar.java index 935932328bc14..02d64bbdf5e0b 100644 --- a/bundles/org.openhab.binding.icalendar/src/main/java/org/openhab/binding/icalendar/internal/logic/BiweeklyPresentableCalendar.java +++ b/bundles/org.openhab.binding.icalendar/src/main/java/org/openhab/binding/icalendar/internal/logic/BiweeklyPresentableCalendar.java @@ -64,6 +64,7 @@ */ @NonNullByDefault class BiweeklyPresentableCalendar extends AbstractPresentableCalendar { + private static final Duration ONE_DAY = Duration.ofDays(1).minusNanos(1); private final ICalendar usedCalendar; BiweeklyPresentableCalendar(InputStream streamed) throws IOException, CalendarException { @@ -343,11 +344,14 @@ private void classifyEvents(Collection positiveEvents, Collection