]> granicus.if.org Git - icinga2/commitdiff
Eliminate time(NULL) in StatusDataWriter
authorMichael Friedrich <michael.friedrich@icinga.com>
Thu, 21 Dec 2017 11:12:06 +0000 (12:12 +0100)
committerMichael Friedrich <michael.friedrich@icinga.com>
Mon, 15 Jan 2018 12:39:34 +0000 (13:39 +0100)
lib/compat/statusdatawriter.cpp

index 62e5e30c771c4d24df5afc579737f34209db9bc3..f81a8d5ef848fb0e88ea30929bdab236ccc96e9b 100644 (file)
@@ -390,7 +390,7 @@ void StatusDataWriter::DumpCheckableStatusAttrs(std::ostream& fp, const Checkabl
                "\t" "max_attempts=" << checkable->GetMaxCheckAttempts() << "\n"
                "\t" "last_state_change=" << static_cast<long>(checkable->GetLastStateChange()) << "\n"
                "\t" "last_hard_state_change=" << static_cast<long>(checkable->GetLastHardStateChange()) << "\n"
-               "\t" "last_update=" << static_cast<long>(time(NULL)) << "\n"
+               "\t" "last_update=" << static_cast<long>(Utility::GetTime()) << "\n"
                "\t" "notifications_enabled" "\t" << Convert::ToLong(checkable->GetEnableNotifications()) << "\n"
                "\t" "active_checks_enabled=" << Convert::ToLong(checkable->GetEnableActiveChecks()) << "\n"
                "\t" "passive_checks_enabled=" << Convert::ToLong(checkable->GetEnablePassiveChecks()) << "\n"