diff --git a/src/main/java/de/ph87/homeautomation/schedule/ScheduleCalculationService.java b/src/main/java/de/ph87/homeautomation/schedule/ScheduleCalculationService.java index ea7784c..ce83438 100644 --- a/src/main/java/de/ph87/homeautomation/schedule/ScheduleCalculationService.java +++ b/src/main/java/de/ph87/homeautomation/schedule/ScheduleCalculationService.java @@ -61,7 +61,7 @@ public class ScheduleCalculationService { ZonedDateTime midnight = now.withHour(0).withMinute(0).withSecond(0).withNano(0); ZonedDateTime next = calculateEntryForDay(entry, midnight); while (next != null && (!next.isAfter(now) || !isAfterLast(entry, next) || !isWeekdayEnabled(entry, next))) { - log.debug(" -- skipping: {}", next); + log.debug(" -- skipping: next={}", next); midnight = midnight.plusDays(1); next = calculateEntryForDay(entry, midnight); } @@ -70,7 +70,7 @@ public class ScheduleCalculationService { } private boolean isAfterLast(final ScheduleEntry entry, final ZonedDateTime next) { - return entry.getLastClearTimestamp() == null || !next.isAfter(entry.getLastClearTimestamp()); + return entry.getLastClearTimestamp() == null || next.isAfter(entry.getLastClearTimestamp()); } private ZonedDateTime calculateEntryForDay(final ScheduleEntry entry, final ZonedDateTime midnight) {