diff --git a/lib/icinga/scheduleddowntime.cpp b/lib/icinga/scheduleddowntime.cpp index 80d7617ba..4390ca3d2 100644 --- a/lib/icinga/scheduleddowntime.cpp +++ b/lib/icinga/scheduleddowntime.cpp @@ -181,15 +181,8 @@ void ScheduledDowntime::CreateNextDowntime() std::pair segment = FindNextSegment(); - if (segment.first == 0 && segment.second == 0) { - tm reference = Utility::LocalTime(Utility::GetTime()); - reference.tm_mday++; - reference.tm_hour = 0; - reference.tm_min = 0; - reference.tm_sec = 0; - + if (segment.first == 0 && segment.second == 0) return; - } String downtimeName = Downtime::AddDowntime(GetCheckable(), GetAuthor(), GetComment(), segment.first, segment.second, @@ -261,4 +254,4 @@ void ScheduledDowntime::ValidateChildOptions(const Lazy& lvalue, const Va } catch (const std::exception&) { BOOST_THROW_EXCEPTION(ValidationError(this, { "child_options" }, "Invalid child_options specified")); } -} \ No newline at end of file +}