diff --git a/Log.cpp b/Log.cpp index bc09104..97ed626 100644 --- a/Log.cpp +++ b/Log.cpp @@ -171,7 +171,9 @@ std::ostream& defaultEntryMetaTime(std::ostream& os, const Entry& e) { // MinGW doesn't support the ISO8601 formatting characters like "%F" and "%T" // ref: https://sourceforge.net/p/mingw-w64/bugs/793/ // Therefore, use a more verbose time string - return os << "[" << std::put_time(&tm, "%Y-%m-%d %H:%M:%S") << "]"; + char buf[24]; + std::strftime(buf, sizeof(buf), "[%Y-%m-%d %H:%M:%S]", &tm); + return os << buf; } std::ostream& defaultEntryMetaLevel(std::ostream& os, const Entry& e) {