Skip to content

Commit

Permalink
Merge branch '#145' into 0.2-Dev
Browse files Browse the repository at this point in the history
  • Loading branch information
DieSlower committed Nov 2, 2021
2 parents 84d9d02 + 6e53316 commit ef79549
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion include/trUtil/DateTime.h
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
6 changes: 3 additions & 3 deletions src/trUtil/DateTime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)
{
Expand Down
4 changes: 2 additions & 2 deletions src/trUtil/Logging/LogWriterFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down Expand Up @@ -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)
{
Expand Down

0 comments on commit ef79549

Please sign in to comment.