diff --git a/Source/Core/AudioCommon/AudioCommon.cpp b/Source/Core/AudioCommon/AudioCommon.cpp index cd158f69e1..19ac9f6e9f 100644 --- a/Source/Core/AudioCommon/AudioCommon.cpp +++ b/Source/Core/AudioCommon/AudioCommon.cpp @@ -211,7 +211,7 @@ void StartAudioDump() 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, *std::localtime(&start_time)); + fmt::format("{}_{:%Y-%m-%d_%H-%M-%S}", path_prefix, fmt::localtime(start_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); diff --git a/Source/Core/Common/SettingsHandler.cpp b/Source/Core/Common/SettingsHandler.cpp index 54e7d1d929..109c80abb8 100644 --- a/Source/Core/Common/SettingsHandler.cpp +++ b/Source/Core/Common/SettingsHandler.cpp @@ -140,6 +140,6 @@ std::string SettingsHandler::GenerateSerialNumber() // Must be 9 characters at most; otherwise the serial number will be rejected by SDK libraries, // as there is a check to ensure the string length is strictly lower than 10. // 3 for %j, 2 for %H, 2 for %M, 2 for %S. - return fmt::format("{:%j%H%M%S}", *std::localtime(&t)); + return fmt::format("{:%j%H%M%S}", fmt::localtime(t)); } } // namespace Common diff --git a/Source/Core/Core/Core.cpp b/Source/Core/Core/Core.cpp index 709c899e06..622d7f9d90 100644 --- a/Source/Core/Core/Core.cpp +++ b/Source/Core/Core/Core.cpp @@ -748,7 +748,7 @@ static std::string GenerateScreenshotName() const std::time_t cur_time = std::time(nullptr); const std::string base_name = - fmt::format("{}_{:%Y-%m-%d_%H-%M-%S}", path_prefix, *std::localtime(&cur_time)); + fmt::format("{}_{:%Y-%m-%d_%H-%M-%S}", path_prefix, fmt::localtime(cur_time)); // First try a filename without any suffixes, if already exists then append increasing numbers std::string name = fmt::format("{}.png", base_name); diff --git a/Source/Core/VideoCommon/FrameDump.cpp b/Source/Core/VideoCommon/FrameDump.cpp index 2773c0e0fe..08041a7177 100644 --- a/Source/Core/VideoCommon/FrameDump.cpp +++ b/Source/Core/VideoCommon/FrameDump.cpp @@ -86,7 +86,7 @@ std::string GetDumpPath(const std::string& extension, std::time_t time, u32 inde File::GetUserPath(D_DUMPFRAMES_IDX) + SConfig::GetInstance().GetGameID(); const std::string base_name = - fmt::format("{}_{:%Y-%m-%d_%H-%M-%S}_{}", path_prefix, *std::localtime(&time), index); + fmt::format("{}_{:%Y-%m-%d_%H-%M-%S}_{}", path_prefix, fmt::localtime(time), index); const std::string path = fmt::format("{}.{}", base_name, extension);