[icinga-checkins] icinga.org: icinga2/feature/collector-3446: Fix timestamp format for the .timestamp file

git at icinga.org git at icinga.org
Thu Feb 12 14:42:18 CET 2015


Module: icinga2
Branch: feature/collector-3446
Commit: f07fb9726403b56cf5e918ea01319eae456fb7d4
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=f07fb9726403b56cf5e918ea01319eae456fb7d4

Author: Gunnar Beutner <gunnar at beutner.name>
Date:   Mon Feb  9 15:22:55 2015 +0100

Fix timestamp format for the .timestamp file

fixes #8313

---

 lib/remote/apilistener-sync.cpp |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/remote/apilistener-sync.cpp b/lib/remote/apilistener-sync.cpp
index ec76a16..8418355 100644
--- a/lib/remote/apilistener-sync.cpp
+++ b/lib/remote/apilistener-sync.cpp
@@ -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();
 	}
 



More information about the icinga-checkins mailing list