LOG: fix month in log file

This commit is contained in:
Martin Kiewitz 2015-03-20 11:26:42 +01:00
parent 15a4371b2d
commit 7c967e2f19

View file

@ -93,10 +93,12 @@ void Log::print(const char *message, const bool printTime) {
void Log::printTimeStamp() {
TimeDate date;
int curMonth;
_system->getTimeAndDate(date);
curMonth = date.tm_mon + 1; // month is base 0, we need base 1 (1 = january and so on)
_stream->writeString(Common::String::format("[%d-%02d-%02d %02d:%02d:%02d] ",
date.tm_year + 1900, date.tm_mon, date.tm_mday,
date.tm_year + 1900, curMonth, date.tm_mday,
date.tm_hour, date.tm_min, date.tm_sec));
}