Functions - format_hours(): Adjust minute formatting.
This commit is contained in:
parent
f4c141f6ef
commit
b1cf7d7e1d
|
|
@ -817,7 +817,7 @@ function format_string($format, $data) {
|
||||||
//format seconds into hh:mm:ss
|
//format seconds into hh:mm:ss
|
||||||
function format_hours($seconds) {
|
function format_hours($seconds) {
|
||||||
$hours = floor($seconds / 3600);
|
$hours = floor($seconds / 3600);
|
||||||
$minutes = floor(($seconds / 60) % 60);
|
$minutes = floor(floor($seconds / 60) % 60);
|
||||||
$seconds = $seconds % 60;
|
$seconds = $seconds % 60;
|
||||||
if (strlen($minutes) == 1) { $minutes = '0'.$minutes; }
|
if (strlen($minutes) == 1) { $minutes = '0'.$minutes; }
|
||||||
if (strlen($seconds) == 1) { $seconds = '0'.$seconds; }
|
if (strlen($seconds) == 1) { $seconds = '0'.$seconds; }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue