From 4daa03dc0210c8faa4ff2176bfbe5d1692a08be3 Mon Sep 17 00:00:00 2001 From: Yonas Habteab Date: Mon, 29 Jan 2024 08:28:31 +0100 Subject: [PATCH] Fix broken timeperiods/scheduleddowntimes --- lib/icinga/legacytimeperiod.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/icinga/legacytimeperiod.cpp b/lib/icinga/legacytimeperiod.cpp index 33e666544..1613c1687 100644 --- a/lib/icinga/legacytimeperiod.cpp +++ b/lib/icinga/legacytimeperiod.cpp @@ -31,7 +31,7 @@ bool LegacyTimePeriod::IsInTimeRange(const tm *begin, const tm *end, int stride, tsend = mktime_const(end); tsref = mktime_const(reference); - if (tsref < tsbegin || tsref > tsend) + if (tsref < tsbegin || tsref >= tsend) return false; int daynumber = (tsref - tsbegin) / (24 * 60 * 60);