UnifiedHistory: Take locale into account in the time format (#101161)

pull/101166/head
Laura Fernández 5 months ago committed by GitHub
parent ffb8ef850b
commit f5e60b5abb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      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) {
))}
</div>
<Text variant="bodySmall" color="secondary">
{moment(time).format('h:mm A')}
{formatDate(time, { timeStyle: 'short' })}
</Text>
{sparklineData && (
<Sparkline

Loading…
Cancel
Save