diff options
| author | Léo Lam <leo@leolam.fr> | 2021-10-15 22:49:13 +0200 |
|---|---|---|
| committer | Léo Lam <leo@leolam.fr> | 2021-10-15 22:49:13 +0200 |
| commit | fd7df2ccae4ef18e8fdcf3dcf369c8f2ff185825 (patch) | |
| tree | 6190be50acc14fd9421d1e193879794e7495ec0a /Source/Core/Common/SettingsHandler.cpp | |
| parent | 2187f11b083e4c8b4d0d1110810c5d4625af73dd (diff) | |
Use fmt::localtime instead of thread-unsafe std::localtime
fmt::localtime is also less awkward to use compared to std::localtime.
Diffstat (limited to 'Source/Core/Common/SettingsHandler.cpp')
| -rw-r--r-- | Source/Core/Common/SettingsHandler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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 |
