Merge pull request #14342 from nextcloud/bugfix/13911-occ-files-scan-elapsedtime-not-good-after-1day

Fix occ files:scan elapsed time
This commit is contained in:
Morris Jobke 2019-02-26 15:46:22 +01:00 committed by GitHub
commit 0051bb7e4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 8 deletions

View file

@ -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);
}
/**

View file

@ -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);
}
/**