diff options
author | Remi Collet <remi@remirepo.net> | 2025-03-13 12:07:19 +0100 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2025-03-13 12:07:19 +0100 |
commit | f3a86f081c704d556678154634cfe5952e972882 (patch) | |
tree | b0adb748c22a9a6cb3f50cbcce4b6c1c817feadf /check.php | |
parent | 5bc6cf7eb9da2818c5837f16a593aac639b31973 (diff) |
Diffstat (limited to 'check.php')
-rwxr-xr-x | check.php | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -176,10 +176,10 @@ function delta($ref, $loc) { if ($d >= 60) { $d /= 60; if ($d >= 60) { - $d /= 60; + $d = (int)($d / 60); if ($d >= 24) { - $d /= 24; - $unit = 'day'; + $d = (int)($d / 60); + $unit = 'DAY'; } else { $unit = 'hour'; } @@ -192,7 +192,7 @@ function delta($ref, $loc) { if ($d > 1) { $unit .= 's'; } - return sprintf("%s :%3d %s ago", date('r', $loc), $d, $unit); + return sprintf("%s :%3d %s", date('r', $loc), $d, $unit); } if (isset($_GET['mirror']) && isset($repos[$_GET['mirror']])) { |