diff --git a/src/formatters.cpp b/src/formatters.cpp index b6eb5f1f..a3ebf081 100644 --- a/src/formatters.cpp +++ b/src/formatters.cpp @@ -13,12 +13,11 @@ static thread_local char timestamp_cache[64]; void c11log::formatters::format_time(const time_point& tp, std::ostream &dest) { - using namespace std::chrono; - // Cache timestamp string of last second + using namespace std::chrono; if(duration_cast(tp-last_tp).count() >= 1) { - auto tm = details::os::localtime(std::chrono::system_clock::to_time_t(tp)); + auto tm = details::os::localtime(clock::to_time_t(tp)); sprintf(timestamp_cache, "[%d-%02d-%02d %02d:%02d:%02d]", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,