App: replace ctime() with boost's date/time functions in Application::logStatus()

This commit is contained in:
wmayer
2021-09-30 19:50:19 +02:00
parent 44ffc4653f
commit 0c62c22554
2 changed files with 5 additions and 5 deletions

View File

@@ -39,10 +39,10 @@
# define WINVER 0x502 // needed for SetDllDirectory
# include <Windows.h>
# endif
# include <ctime>
# include <csignal>
# include <boost/program_options.hpp>
# include <boost/filesystem.hpp>
# include <boost/date_time/posix_time/posix_time.hpp>
#endif
#ifdef FC_OS_WIN32
@@ -2295,9 +2295,9 @@ void Application::runApplication()
void Application::logStatus()
{
time_t now;
time(&now);
Console().Log("Time = %s", ctime(&now));
std::string time_str = boost::posix_time::to_simple_string(
boost::posix_time::second_clock::local_time());
Console().Log("Time = %s\n", time_str.c_str());
for (std::map<std::string,std::string>::iterator It = mConfig.begin();It!= mConfig.end();++It) {
Console().Log("%s = %s\n",It->first.c_str(),It->second.c_str());