From fd7df2ccae4ef18e8fdcf3dcf369c8f2ff185825 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Fri, 15 Oct 2021 22:49:13 +0200 Subject: Use fmt::localtime instead of thread-unsafe std::localtime fmt::localtime is also less awkward to use compared to std::localtime. --- Source/Core/Common/SettingsHandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/Common/SettingsHandler.cpp') 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 -- cgit v1.2.3