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
parent 2187f11b08
commit fd7df2ccae
4 changed files with 4 additions and 4 deletions

View File

@ -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);