fix timeunits2() for 0 sec

This commit is contained in:
Xkeeper 2019-01-02 11:54:22 -08:00
parent 274a70e66f
commit e1b2e62262
No known key found for this signature in database
GPG Key ID: 397C04773ABE4045

View File

@ -333,6 +333,7 @@ function timeunits($sec){
} }
function timeunits2($sec){ function timeunits2($sec){
if (floor($sec) === 0) { return "0 sec."; }
$d = floor($sec/86400); $d = floor($sec/86400);
$h = floor($sec/3600)%24; $h = floor($sec/3600)%24;
$m = floor($sec/60)%60; $m = floor($sec/60)%60;