]> granicus.if.org Git - icinga2/commitdiff
Fix timestamp format for the .timestamp file
authorGunnar Beutner <gunnar@beutner.name>
Mon, 9 Feb 2015 14:22:55 +0000 (15:22 +0100)
committerGunnar Beutner <gunnar@beutner.name>
Mon, 9 Feb 2015 14:22:55 +0000 (15:22 +0100)
fixes #8313

lib/remote/apilistener-sync.cpp

index ec76a16fb476d68eced38daa2aee597f096e05f3..841835553e3598fda9433c7fede10172fefe1006 100644 (file)
@@ -25,6 +25,7 @@
 #include "base/exception.hpp"
 #include <boost/foreach.hpp>
 #include <fstream>
+#include <iomanip>
 
 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();
        }