aboutsummaryrefslogtreecommitdiff
path: root/modern/src/common
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-04-16 20:34:34 -0700
committerAnton Tananaev <anton@traccar.org>2022-04-16 20:34:34 -0700
commitcd406f43db64da07458a12b5dac72022cccaee6d (patch)
tree4644a5ab3bfaa11c910e803bee0a1569a5a39d03 /modern/src/common
parent5cfa27b57d47bcffc69f14f05c98515f48224d8d (diff)
downloadtrackermap-web-cd406f43db64da07458a12b5dac72022cccaee6d.tar.gz
trackermap-web-cd406f43db64da07458a12b5dac72022cccaee6d.tar.bz2
trackermap-web-cd406f43db64da07458a12b5dac72022cccaee6d.zip
Update position page
Diffstat (limited to 'modern/src/common')
-rw-r--r--modern/src/common/formatter.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/modern/src/common/formatter.js b/modern/src/common/formatter.js
index 32df04c2..1d4806e8 100644
--- a/modern/src/common/formatter.js
+++ b/modern/src/common/formatter.js
@@ -5,6 +5,7 @@ export const formatBoolean = (value, t) => (value ? t('sharedYes') : t('sharedNo
export const formatNumber = (value, precision = 1) => Number(value.toFixed(precision));
export const formatDate = (value, format = 'YYYY-MM-DD HH:mm') => moment(value).format(format);
+export const formatTime = (value, format = 'YYYY-MM-DD HH:mm:ss') => moment(value).format(format);
export const formatPosition = (value, key, t) => {
if (value != null && typeof value === 'object') {
@@ -15,7 +16,7 @@ export const formatPosition = (value, key, t) => {
case 'deviceTime':
case 'serverTime':
case 'eventTime':
- return moment(value).format('LLL');
+ return formatTime(value);
case 'latitude':
case 'longitude':
return value.toFixed(5);