if (timesBegin != Empty && timesBegin >= 0 && now < checkable->GetLastHardStateChange() + timesBegin) {
Log(LogNotice, "Notification")
- << "Not sending " << (reminder ? "reminder " : " ") << "notifications for notification object '" << GetName()
- << "': before specified begin time (" << Utility::FormatDuration(timesBegin) << ")";
+ << "Not sending " << (reminder ? "reminder " : " ") << "notifications for notification object '"
+ << notificationName << "': before specified begin time (" << Utility::FormatDuration(timesBegin) << ")";
/* we need to adjust the next notification time
- * to now + begin delaying the first notification
+ * delaying the first notification
*/
- double nextProposedNotification = now + timesBegin + 1.0;
- if (GetNextNotification() > nextProposedNotification)
- SetNextNotification(nextProposedNotification);
+ SetNextNotification(checkable->GetLastHardStateChange() + timesBegin + 1.0);
return;
}