format absolute dates in popups in user locale instead of GMT

This commit is contained in:
Athou
2023-06-22 22:33:53 +02:00
parent f140650b4e
commit bb55a91a14

View File

@@ -13,7 +13,7 @@ export function RelativeDate(props: { date: Date | number | undefined }) {
if (!props.date) return <Trans>N/A</Trans>
const date = dayjs(props.date)
return (
<Tooltip label={date.toString()} openDelay={500}>
<Tooltip label={date.toDate().toLocaleString()} openDelay={500}>
<span>{date.from(dayjs(now))}</span>
</Tooltip>
)