fix(logger): logging timestamps should show local time

This commit is contained in:
Marcus Holland-Moritz 2025-05-13 13:36:19 +02:00
parent 7b0b1cdc0c
commit be8a152a98

View File

@ -393,8 +393,9 @@ std::string get_logger_context(source_location loc) {
std::string get_current_time_string() {
using namespace std::chrono;
auto now = floor<microseconds>(system_clock::now());
return fmt::format("{:%H:%M:%S}", now);
auto const now = floor<microseconds>(system_clock::now());
auto const local = safe_localtime(system_clock::to_time_t(now));
return fmt::format("{:%H:%M}:{:%S}", local, now);
}
} // namespace dwarfs