aboutsummaryrefslogtreecommitdiff
path: root/modern/src/reports/SummaryReportPage.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-11-06 17:00:03 -0800
committerAnton Tananaev <anton@traccar.org>2022-11-06 17:00:03 -0800
commita9c8b1b6c513257a5fd69cf00992d4fec59d6069 (patch)
treeb2fa1bd33ae8766affb4ac1cfdba2dde5a9a54de /modern/src/reports/SummaryReportPage.js
parent4d6d5eca8c6ee8c43340d18d323816885edeb9da (diff)
downloadtrackermap-web-a9c8b1b6c513257a5fd69cf00992d4fec59d6069.tar.gz
trackermap-web-a9c8b1b6c513257a5fd69cf00992d4fec59d6069.tar.bz2
trackermap-web-a9c8b1b6c513257a5fd69cf00992d4fec59d6069.zip
Respect 12 hour time
Diffstat (limited to 'modern/src/reports/SummaryReportPage.js')
-rw-r--r--modern/src/reports/SummaryReportPage.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/modern/src/reports/SummaryReportPage.js b/modern/src/reports/SummaryReportPage.js
index f8216155..d66d58c6 100644
--- a/modern/src/reports/SummaryReportPage.js
+++ b/modern/src/reports/SummaryReportPage.js
@@ -7,7 +7,7 @@ import {
formatDistance, formatHours, formatSpeed, formatVolume, formatTime,
} from '../common/util/formatter';
import ReportFilter from './components/ReportFilter';
-import { useAttributePreference } from '../common/util/preferences';
+import { useAttributePreference, usePreference } from '../common/util/preferences';
import { useTranslation } from '../common/components/LocalizationProvider';
import PageLayout from '../common/components/PageLayout';
import ReportsMenu from './components/ReportsMenu';
@@ -38,6 +38,7 @@ const SummaryReportPage = () => {
const distanceUnit = useAttributePreference('distanceUnit');
const speedUnit = useAttributePreference('speedUnit');
const volumeUnit = useAttributePreference('volumeUnit');
+ const hours12 = usePreference('twelveHourFormat');
const [columns, setColumns] = usePersistedState('summaryColumns', ['startTime', 'distance', 'averageSpeed']);
const [daily, setDaily] = useState(false);
@@ -77,7 +78,7 @@ const SummaryReportPage = () => {
case 'deviceId':
return devices[item[key]].name;
case 'startTime':
- return item[key] ? formatTime(item[key], 'YYYY-MM-DD') : null;
+ return formatTime(item[key], 'date', hours12);
case 'startOdometer':
case 'endOdometer':
case 'distance':