diff --git a/include/trUtil/DateTime.h b/include/trUtil/DateTime.h index 1101f5c..b46664d 100644 --- a/include/trUtil/DateTime.h +++ b/include/trUtil/DateTime.h @@ -145,7 +145,7 @@ namespace trUtil public: - /** @brief LOCAL_DATE_AND_TIME_FORMAT: 04/18/08 13:22:50. */ + /** @brief LOCAL_DATE_AND_TIME_FORMAT: 04-18-08 13:22:50. */ static const TimeFormat LOCAL_DATE_AND_TIME_FORMAT; /** @brief LOCAL_DATE_FORMAT: 04/18/08. */ diff --git a/src/trUtil/DateTime.cpp b/src/trUtil/DateTime.cpp index 7c98836..bfa515c 100644 --- a/src/trUtil/DateTime.cpp +++ b/src/trUtil/DateTime.cpp @@ -606,9 +606,9 @@ namespace trUtil int tzMin = (int)(tz - float(tzHour)); #ifdef TR_WIN - _snprintf_s(buffer, 80, "%04d-%02d-%02dT%02d:%02d:%02d%+03d:%02d", + _snprintf_s(buffer, 80, "%04d-%02d-%02d T%02d:%02d:%02d%+03d:%02d", #else - snprintf(buffer, 80, "%04d-%02d-%02dT%02d:%02d:%02d%+03d:%02d", //Commented out because of deprecation warnings + snprintf(buffer, 80, "%04d-%02d-%02d T%02d:%02d:%02d%+03d:%02d", //Commented out because of deprecation warnings #endif //TR_WIN timeParts.tm_year + 1900, timeParts.tm_mon + 1, timeParts.tm_mday, timeParts.tm_hour, timeParts.tm_min, timeParts.tm_sec, @@ -618,7 +618,7 @@ namespace trUtil { if (tf == TimeFormat::LOCAL_DATE_AND_TIME_FORMAT) { - strftime(buffer, 80, "%c", &timeParts); + strftime(buffer, 80, "%F %T", &timeParts); } else if (tf == TimeFormat::CLOCK_TIME_12_HOUR_FORMAT) { diff --git a/src/trUtil/Logging/LogWriterFile.cpp b/src/trUtil/Logging/LogWriterFile.cpp index 411174a..023dbb7 100644 --- a/src/trUtil/Logging/LogWriterFile.cpp +++ b/src/trUtil/Logging/LogWriterFile.cpp @@ -127,7 +127,7 @@ namespace trUtil::Logging { trUtil::DateTime dt; dt.SetToLocalTime(); - mLogFile << prefix << dt.ToString(trUtil::DateTime::TimeFormat::CLOCK_TIME_24_HOUR_FORMAT) << std::endl; + mLogFile << prefix << dt.ToString(trUtil::DateTime::TimeFormat::LOCAL_DATE_AND_TIME_FORMAT) << std::endl; mLogFile.flush(); } @@ -179,7 +179,7 @@ namespace trUtil::Logging lineEnd += htmlNewline.size() + 1; } - mLogFile << color << "[" << logData.time.ToString(trUtil::DateTime::TimeFormat::CLOCK_TIME_24_HOUR_FORMAT); + mLogFile << color << "[" << logData.time.ToString(trUtil::DateTime::TimeFormat::LOCAL_DATE_AND_TIME_FORMAT); if (logData.frameNumber > 0) {