diff --git a/lib/icingadb/icingadb-objects.cpp b/lib/icingadb/icingadb-objects.cpp index 101c31bad88..2061ad6bca7 100644 --- a/lib/icingadb/icingadb-objects.cpp +++ b/lib/icingadb/icingadb-objects.cpp @@ -1386,8 +1386,8 @@ bool IcingaDB::PrepareObject(const ConfigObject::Ptr& object, Dictionary::Ptr& a auto begin (notification->GetTimes()->Get("begin")); auto end (notification->GetTimes()->Get("end")); - attributes->Set("times_begin", begin == Empty ? Empty : Value(std::round((double)begin))); - attributes->Set("times_end", end == Empty ? Empty : Value(std::round((double)end))); + attributes->Set("times_begin", begin == Empty || (double)begin < 0 ? Empty : Value(std::round((double)begin))); + attributes->Set("times_end", end == Empty || (double)end < 0 ? Empty : Value(std::round((double)end))); } attributes->Set("notification_interval", notification->GetInterval());