From 4b65cc9a4c51af4308f748b3e7bf25d80db83860 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Vanda=C3=ABle?= Date: Wed, 4 Jun 2025 13:12:50 +0200 Subject: fmt: Replace deprecated `fmt::localtime` usage with `Common::LocalTime` --- Source/Core/AudioCommon/AudioCommon.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Source/Core/AudioCommon/AudioCommon.cpp') diff --git a/Source/Core/AudioCommon/AudioCommon.cpp b/Source/Core/AudioCommon/AudioCommon.cpp index de046a9aab..1258e0fd7e 100644 --- a/Source/Core/AudioCommon/AudioCommon.cpp +++ b/Source/Core/AudioCommon/AudioCommon.cpp @@ -16,6 +16,7 @@ #include "AudioCommon/WASAPIStream.h" #include "Common/FileUtil.h" #include "Common/Logging/Log.h" +#include "Common/TimeUtil.h" #include "Core/Config/MainSettings.h" #include "Core/ConfigManager.h" #include "Core/System.h" @@ -218,8 +219,11 @@ void StartAudioDump(Core::System& system) std::string path_prefix = File::GetUserPath(D_DUMPAUDIO_IDX) + SConfig::GetInstance().GetGameID(); - std::string base_name = - fmt::format("{}_{:%Y-%m-%d_%H-%M-%S}", path_prefix, fmt::localtime(start_time)); + const auto local_time = Common::LocalTime(start_time); + if (!local_time) + return; + + std::string base_name = fmt::format("{}_{:%Y-%m-%d_%H-%M-%S}", path_prefix, *local_time); const std::string audio_file_name_dtk = fmt::format("{}_dtkdump.wav", base_name); const std::string audio_file_name_dsp = fmt::format("{}_dspdump.wav", base_name); -- cgit v1.2.3