diff --git a/simpleble/src/Logging.cpp b/simpleble/src/Logging.cpp index 781b658..6b05e44 100644 --- a/simpleble/src/Logging.cpp +++ b/simpleble/src/Logging.cpp @@ -90,7 +90,11 @@ void Logger::log_default_stdout() { void Logger::log_default_file() { std::time_t t = std::time(nullptr); +#if FMT_VERSION < 120000 std::string date_time_str = fmt::format("{:%Y-%m-%d_%H-%M-%S}", fmt::localtime(t)); +#else + std::string date_time_str = fmt::format("{:%Y-%m-%d_%H-%M-%S}", *std::localtime(&t)); +#endif std::string filename = fmt::format("simpleble_{}", date_time_str); log_default_file(filename); }