Use fmt::localtime instead of thread-unsafe std::localtime

fmt::localtime is also less awkward to use compared to std::localtime.
This commit is contained in:
Léo Lam 2021-10-15 22:49:13 +02:00
commit fd7df2ccae
No known key found for this signature in database
GPG key ID: 0DF30F9081000741
4 changed files with 4 additions and 4 deletions

View file

@ -210,7 +210,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);