summaryrefslogtreecommitdiffstats
path: root/apps/files/lib/Command
diff options
context:
space:
mode:
authorJoel S <joel.devbox@protonmail.com>2019-02-22 20:55:24 +0530
committerJoel S <joel.devbox@protonmail.com>2019-02-22 20:55:24 +0530
commit27aafa77db2e133621c4e3755b4312cc7a96e063 (patch)
tree781f78083f4c62d3988a3b73e22045898a2f99d4 /apps/files/lib/Command
parentf29b092a76c6dbf961ec3a7a5722729b9b1f882d (diff)
downloadnextcloud-server-27aafa77db2e133621c4e3755b4312cc7a96e063.tar.gz
nextcloud-server-27aafa77db2e133621c4e3755b4312cc7a96e063.zip
Fix occ files:scan-app-data elapsed time
Signed-off-by: Joel S <joel.devbox@protonmail.com>
Diffstat (limited to 'apps/files/lib/Command')
-rw-r--r--apps/files/lib/Command/Scan.php2
-rw-r--r--apps/files/lib/Command/ScanAppData.php7
2 files changed, 4 insertions, 5 deletions
diff --git a/apps/files/lib/Command/Scan.php b/apps/files/lib/Command/Scan.php
index 3c2ab716cec..6950afd1f00 100644
--- a/apps/files/lib/Command/Scan.php
+++ b/apps/files/lib/Command/Scan.php
@@ -291,7 +291,7 @@ class Scan extends Base {
protected function formatExecTime() {
$secs = round($this->execTime);
# convert seconds into HH:MM:SS form
- return sprintf('%02d:%02d:%02d', ($secs/3600),($secs/60%60), $secs%60);
+ 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);
}
/**