]> granicus.if.org Git - icinga2/commitdiff
* BugFix : Wrong operator on stride variable causing incorrect behaviour ( #6749 ) 6750/head
authorDavid Lublink <github.com@spam.lublink.net>
Thu, 1 Nov 2018 22:51:42 +0000 (18:51 -0400)
committerDavid Lublink <github.com@spam.lublink.net>
Thu, 1 Nov 2018 22:51:42 +0000 (18:51 -0400)
lib/icinga/legacytimeperiod.cpp

index eea88e2ca21b90611dfb275186a05262e233b9f3..6433d0d6cc208a6327376feb96b2647adca5c5a0 100644 (file)
@@ -42,7 +42,7 @@ bool LegacyTimePeriod::IsInTimeRange(tm *begin, tm *end, int stride, tm *referen
 
        int daynumber = (tsref - tsbegin) / (24 * 60 * 60);
 
-       if (stride > 1 && daynumber % stride == 0)
+       if (stride > 1 && daynumber % stride > 0)
                return false;
 
        return true;