Update Formatter.php

Fix error in display time higher than 60 minutes
This commit is contained in:
Chapelier2000 2017-07-18 12:16:54 +02:00 committed by GitHub
parent a052037ac5
commit 3e21b04bbc
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ abstract class Formatter implements UsageInformationAble {
$minutes = floor($seconds / 60);
$hours = floor($minutes / 60);
$minutes -= $hours * 60;
$seconds -= $hours * 60 + $minutes * 60;
$seconds -= ($hours * 60 + $minutes) * 60;
$format = ($hours > 0 ? $hours . ':' : '');
$format .= ($hours > 0 && $minutes < 10 ? '0' : '') . $minutes . ':';
$format .= ($seconds < 10 ? '0' : '') . $seconds . ':';