Fix timestamp format for the .timestamp file

fixes #8313
This commit is contained in:
Gunnar Beutner 2015-02-09 15:22:55 +01:00
parent 438e6dcd09
commit f07fb97264
1 changed files with 2 additions and 1 deletions

View 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();
}