Merge pull request #10169 from leoetlino/fmt-localtime
Use fmt::localtime instead of thread-unsafe std::localtime
This commit is contained in:
4 files changed
+4
-4
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user