From 880b768abd1ff112a58cbf9925df024893e90262 Mon Sep 17 00:00:00 2001 From: Ykkrosh Date: Fri, 27 Aug 2004 18:47:14 +0000 Subject: [PATCH] Noticed "Engine exited successfully on " << __DATE__ This was SVN commit r1069. --- source/ps/CLogger.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/source/ps/CLogger.cpp b/source/ps/CLogger.cpp index 3653b1d1fb..4efe684ae9 100755 --- a/source/ps/CLogger.cpp +++ b/source/ps/CLogger.cpp @@ -60,14 +60,22 @@ CLogger::~CLogger () sprintf(buffer," with %d message(s), %d error(s) and %d warning(s).", \ m_NumberOfMessages,m_NumberOfErrors,m_NumberOfWarnings); + time_t t = time(NULL); + struct tm* now = localtime(&t); + const char* months[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; + CStr currentDate = CStr(months[now->tm_mon]) + " " + CStr(now->tm_mday) + " " + CStr(1900+now->tm_year); + char currentTime[10]; + sprintf(currentTime, "%02d:%02d:%02d", now->tm_hour, now->tm_min, now->tm_sec); + //Write closing text - m_MainLog << "

Engine exited successfully on " << __DATE__; - m_MainLog << " at " << __TIME__ << buffer << "

\n"; + + m_MainLog << "

Engine exited successfully on " << currentDate; + m_MainLog << " at " << currentTime << buffer << "

\n"; m_MainLog << html_footer; m_MainLog.close (); - m_InterestingLog << "

Engine exited successfully on " << __DATE__; - m_InterestingLog << " at " << __TIME__ << buffer << "

\n"; + m_InterestingLog << "

Engine exited successfully on " << currentDate; + m_InterestingLog << " at " << currentTime << buffer << "

\n"; m_InterestingLog << html_footer; m_InterestingLog.close ();