From f5e60b5abb4c467cc2e56f431067b4916ae93fd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Fern=C3=A1ndez?= Date: Fri, 21 Feb 2025 17:46:14 +0100 Subject: [PATCH] UnifiedHistory: Take locale into account in the time format (#101161) --- .../app/core/components/AppChrome/History/HistoryWrapper.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/app/core/components/AppChrome/History/HistoryWrapper.tsx b/public/app/core/components/AppChrome/History/HistoryWrapper.tsx index da8a048f9cd..89b46ca0b80 100644 --- a/public/app/core/components/AppChrome/History/HistoryWrapper.tsx +++ b/public/app/core/components/AppChrome/History/HistoryWrapper.tsx @@ -5,6 +5,7 @@ import { useState } from 'react'; import { FieldType, GrafanaTheme2, store } from '@grafana/data'; import { Button, Card, IconButton, Space, Stack, Text, useStyles2, Box, Sparkline, useTheme2, Icon } from '@grafana/ui'; import { t } from 'app/core/internationalization'; +import { formatDate } from 'app/core/internationalization/dates'; import { HISTORY_LOCAL_STORAGE_KEY } from '../AppChromeService'; import { HistoryEntry } from '../types'; @@ -139,7 +140,7 @@ function HistoryEntryAppView({ entry, isSelected, onClick }: ItemProps) { ))} - {moment(time).format('h:mm A')} + {formatDate(time, { timeStyle: 'short' })} {sparklineData && (