diff --git a/include/spdlog/sinks/daily_file_sink.h b/include/spdlog/sinks/daily_file_sink.h index b3323780..8cdf35c1 100644 --- a/include/spdlog/sinks/daily_file_sink.h +++ b/include/spdlog/sinks/daily_file_sink.h @@ -87,7 +87,7 @@ struct daily_filename_format_calculator for (;;) { size_t size = buf.capacity() - start; - size_t count = details::fmt_helper::strftime(&buf[start], size, &tm_format[0], &tm); + size_t count = details::fmt_helper::strftime(&buf[start], size, &tm_format[0], &now_tm); if (count != 0) { // Remove the extra space.