diff --git a/crash_printer/win.cpp b/crash_printer/win.cpp index 5d7b6034..67da0a7f 100644 --- a/crash_printer/win.cpp +++ b/crash_printer/win.cpp @@ -109,6 +109,7 @@ static void log_exception(LPEXCEPTION_POINTERS ex_pointers) auto now = std::chrono::system_clock::now(); auto t_now = std::chrono::system_clock::to_time_t(now); auto gm_time = std::gmtime(&t_now); + auto asc_time = std::asctime(gm_time); auto time = std::string(asc_time ? asc_time : ""); time.pop_back(); // remove the trailing '\n' added by asctime common_helpers::write(file, "[" + time + "]");