From cd406f43db64da07458a12b5dac72022cccaee6d Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 16 Apr 2022 20:34:34 -0700 Subject: Update position page --- modern/src/common/formatter.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modern/src/common') 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); -- cgit v1.2.3