aboutsummaryrefslogtreecommitdiff
path: root/modern/src/reports/StatisticsPage.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/reports/StatisticsPage.js')
-rw-r--r--modern/src/reports/StatisticsPage.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/modern/src/reports/StatisticsPage.js b/modern/src/reports/StatisticsPage.js
index 254a912d..7b3f2879 100644
--- a/modern/src/reports/StatisticsPage.js
+++ b/modern/src/reports/StatisticsPage.js
@@ -12,6 +12,7 @@ import ColumnSelect from './components/ColumnSelect';
import { useCatch } from '../reactHelper';
import useReportStyles from './common/useReportStyles';
import TableShimmer from '../common/components/TableShimmer';
+import { usePreference } from '../common/util/preferences';
const columnsArray = [
['captureTime', 'statisticsCaptureTime'],
@@ -31,6 +32,8 @@ const StatisticsPage = () => {
const classes = useReportStyles();
const t = useTranslation();
+ const hours12 = usePreference('twelveHourFormat');
+
const [columns, setColumns] = usePersistedState('statisticsColumns', ['captureTime', 'activeUsers', 'activeDevices', 'messagesStored']);
const [items, setItems] = useState([]);
const [loading, setLoading] = useState(false);
@@ -68,7 +71,7 @@ const StatisticsPage = () => {
<TableRow key={item.id}>
{columns.map((key) => (
<TableCell key={key}>
- {key === 'captureTime' ? formatTime(item[key], 'YYYY-MM-DD') : item[key]}
+ {key === 'captureTime' ? formatTime(item[key], 'date', hours12) : item[key]}
</TableCell>
))}
</TableRow>