aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-08-28 15:30:49 +0500
committerAbyss777 <abyss@fox5.ru>2017-08-28 15:30:49 +0500
commit197d7b893e85c68040e3fba1d5d2ec0a5985bebe (patch)
tree35aa2c3ea616c9b31ead0bd8721f0a0c2b1aecf8
parentff374f3fb794d75b6657421ee1653f810f2ef4b4 (diff)
downloadetbsa-traccar-web-197d7b893e85c68040e3fba1d5d2ec0a5985bebe.tar.gz
etbsa-traccar-web-197d7b893e85c68040e3fba1d5d2ec0a5985bebe.tar.bz2
etbsa-traccar-web-197d7b893e85c68040e3fba1d5d2ec0a5985bebe.zip
Fix duration formatting
-rw-r--r--.gitignore1
-rw-r--r--web/app/AttributeFormatter.js2
2 files changed, 2 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index d395d2e..ca362d4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
.project
.settings
+.tern-project
.DS_Store
nbproject/
web/app.min.js
diff --git a/web/app/AttributeFormatter.js b/web/app/AttributeFormatter.js
index 957992d..d555205 100644
--- a/web/app/AttributeFormatter.js
+++ b/web/app/AttributeFormatter.js
@@ -55,7 +55,7 @@ Ext.define('Traccar.AttributeFormatter', {
durationFormatter: function (value) {
var hours, minutes;
hours = Math.floor(value / 3600000);
- minutes = Math.round(value % 3600000 / 60000);
+ minutes = value >= 60000 ? Math.floor(value % 3600000 / 60000) : Math.round(value / 60000);
return hours + ' ' + Strings.sharedHourAbbreviation + ' ' + minutes + ' ' + Strings.sharedMinuteAbbreviation;
},