From: Gunnar Beutner Date: Mon, 9 Feb 2015 14:22:55 +0000 (+0100) Subject: Fix timestamp format for the .timestamp file X-Git-Tag: v2.3.0~253 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f07fb9726403b56cf5e918ea01319eae456fb7d4;p=icinga2 Fix timestamp format for the .timestamp file fixes #8313 --- diff --git a/lib/remote/apilistener-sync.cpp b/lib/remote/apilistener-sync.cpp index ec76a16fb..841835553 100644 --- a/lib/remote/apilistener-sync.cpp +++ b/lib/remote/apilistener-sync.cpp @@ -25,6 +25,7 @@ #include "base/exception.hpp" #include #include +#include using namespace icinga; @@ -99,7 +100,7 @@ bool ApiListener::UpdateConfigDir(const Dictionary::Ptr& oldConfig, const Dictio String tsPath = configDir + "/.timestamp"; if (!Utility::PathExists(tsPath)) { std::ofstream fp(tsPath.CStr(), std::ofstream::out | std::ostream::trunc); - fp << Utility::GetTime(); + fp << std::fixed << Utility::GetTime(); fp.close(); }