aboutsummaryrefslogtreecommitdiff
path: root/modern/src/common/formatter.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/common/formatter.js')
-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);