fmt: Replace deprecated fmt::localtime usage with Common::LocalTime

This commit is contained in:
Joshua Vandaële
2025-06-04 13:12:50 +02:00
parent 1c9389a1fb
commit 4b65cc9a4c
9 changed files with 36 additions and 23 deletions

View File

@ -122,7 +122,6 @@ std::string SettingsWriter::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}", fmt::localtime(t));
return fmt::format("{:09}", t % 1000000000);
}
} // namespace Common