mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-18 08:49:29 -04:00
fix(logger): logging timestamps should show local time
This commit is contained in:
parent
2151f6b672
commit
3d97569391
@ -381,8 +381,9 @@ std::string get_logger_context(source_location loc) {
|
|||||||
|
|
||||||
std::string get_current_time_string() {
|
std::string get_current_time_string() {
|
||||||
using namespace std::chrono;
|
using namespace std::chrono;
|
||||||
auto now = floor<microseconds>(system_clock::now());
|
auto const now = floor<microseconds>(system_clock::now());
|
||||||
return fmt::format("{:%H:%M:%S}", now);
|
auto const local = safe_localtime(system_clock::to_time_t(now));
|
||||||
|
return fmt::format("{:%H:%M}:{:%S}", local, now);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace dwarfs
|
} // namespace dwarfs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user