Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions logger/Logger.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,11 @@ Logger::Logger(Severity severity, Verbosity verbosity, std::string_view file, st
break;
case VSpec::Info::timestamp_us:
FillTimeInfos();
fmt::format_to(std::back_inserter(fBWPrefix), "[{:%H:%M:%S}.{:06}]", fmt::localtime(fInfos.timestamp), fInfos.us.count());
fmt::format_to(std::back_inserter(fBWPrefix), "[{:%H:%M:%S}.{:06}]", (std::tm)*std::localtime(&fInfos.timestamp), fInfos.us.count());
break;
case VSpec::Info::timestamp_s:
FillTimeInfos();
fmt::format_to(std::back_inserter(fBWPrefix), "[{:%H:%M:%S}]", fmt::localtime(fInfos.timestamp));
fmt::format_to(std::back_inserter(fBWPrefix), "[{:%H:%M:%S}]", (std::tm)*std::localtime(&fInfos.timestamp));
break;
case VSpec::Info::severity:
fmt::format_to(std::back_inserter(fBWPrefix), "[{}]", fInfos.severity_name);
Expand Down Expand Up @@ -207,11 +207,11 @@ Logger::Logger(Severity severity, Verbosity verbosity, std::string_view file, st
break;
case VSpec::Info::timestamp_us:
FillTimeInfos();
fmt::format_to(std::back_inserter(fColorPrefix), "[{}{:%H:%M:%S}.{:06}{}]", startColor(Color::fgCyan), fmt::localtime(fInfos.timestamp), fInfos.us.count(), endColor());
fmt::format_to(std::back_inserter(fColorPrefix), "[{}{:%H:%M:%S}.{:06}{}]", startColor(Color::fgCyan), (std::tm)*std::localtime(&fInfos.timestamp), fInfos.us.count(), endColor());
break;
case VSpec::Info::timestamp_s:
FillTimeInfos();
fmt::format_to(std::back_inserter(fColorPrefix), "[{}{:%H:%M:%S}{}]", startColor(Color::fgCyan), fmt::localtime(fInfos.timestamp), endColor());
fmt::format_to(std::back_inserter(fColorPrefix), "[{}{:%H:%M:%S}{}]", startColor(Color::fgCyan), (std::tm)*std::localtime(&fInfos.timestamp), endColor());
break;
case VSpec::Info::severity:
fmt::format_to(std::back_inserter(fColorPrefix), "[{}]", GetColoredSeverityString(fInfos.severity));
Expand Down
Loading