aboutsummaryrefslogtreecommitdiff
path: root/backends/log/log.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/log/log.cpp')
-rw-r--r--backends/log/log.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/backends/log/log.cpp b/backends/log/log.cpp
index 693399bae5..e37296aada 100644
--- a/backends/log/log.cpp
+++ b/backends/log/log.cpp
@@ -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));
}