floor to prevent implicit conversion

This commit is contained in:
Beu 2023-01-17 12:32:10 +01:00
parent fab4b98787
commit 9a6d7a9284

View File

@ -89,7 +89,7 @@ abstract class Formatter implements UsageInformationAble {
*/ */
public static function formatTimeH($seconds) { public static function formatTimeH($seconds) {
$hrs = floor($seconds / 3600); $hrs = floor($seconds / 3600);
$mins = intval(($seconds / 60) % 60); $mins = intval(floor(($seconds / 60) % 60));
$sec = intval($seconds % 60); $sec = intval($seconds % 60);
$hrs = str_pad($hrs, 2, '0', STR_PAD_LEFT); $hrs = str_pad($hrs, 2, '0', STR_PAD_LEFT);