diff options
author | Morris Jobke <hey@morrisjobke.de> | 2019-02-26 15:46:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-26 15:46:22 +0100 |
commit | 0051bb7e4cd890793edac99d5b6475457c8580f3 (patch) | |
tree | 1e383fea9631351b611b681ada42a9ee257a1f75 /apps | |
parent | 407c7c2ad356baf83cadbc5edb9db49146766650 (diff) | |
parent | 27aafa77db2e133621c4e3755b4312cc7a96e063 (diff) | |
download | nextcloud-server-0051bb7e4cd890793edac99d5b6475457c8580f3.tar.gz nextcloud-server-0051bb7e4cd890793edac99d5b6475457c8580f3.zip |
Merge pull request #14342 from nextcloud/bugfix/13911-occ-files-scan-elapsedtime-not-good-after-1day
Fix occ files:scan elapsed time
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/lib/Command/Scan.php | 7 | ||||
-rw-r--r-- | apps/files/lib/Command/ScanAppData.php | 7 |
2 files changed, 6 insertions, 8 deletions
diff --git a/apps/files/lib/Command/Scan.php b/apps/files/lib/Command/Scan.php index 4d83d764928..6950afd1f00 100644 --- a/apps/files/lib/Command/Scan.php +++ b/apps/files/lib/Command/Scan.php @@ -289,10 +289,9 @@ class Scan extends Base { * @return string */ protected function formatExecTime() { - list($secs, ) = explode('.', sprintf("%.1f", $this->execTime)); - - # if you want to have microseconds add this: . '.' . $tens; - return date('H:i:s', $secs); + $secs = round($this->execTime); + # convert seconds into HH:MM:SS form + return sprintf('%02d:%02d:%02d', ($secs/3600), ($secs/60%60), $secs%60); } /** diff --git a/apps/files/lib/Command/ScanAppData.php b/apps/files/lib/Command/ScanAppData.php index 04c347afe6b..244293ae70d 100644 --- a/apps/files/lib/Command/ScanAppData.php +++ b/apps/files/lib/Command/ScanAppData.php @@ -216,10 +216,9 @@ class ScanAppData extends Base { * @return string */ protected function formatExecTime() { - list($secs, ) = explode('.', sprintf("%.1f", $this->execTime)); - - # if you want to have microseconds add this: . '.' . $tens; - return date('H:i:s', $secs); + $secs = round($this->execTime); + # convert seconds into HH:MM:SS form + return sprintf('%02d:%02d:%02d', ($secs/3600), ($secs/60%60), $secs%60); } /** |