Merge pull request #1 from Chapelier2000/Chapelier2000-patch-display-time-higher-than-60-min

Update Formatter.php
This commit is contained in:
Chapelier2000 2017-07-18 12:18:12 +02:00 committed by GitHub
commit a40f0eb653
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 . ':';