diff --git a/frontend/src/app/markets/[id]/page.tsx b/frontend/src/app/markets/[id]/page.tsx index 5ae3a63..042b96c 100644 --- a/frontend/src/app/markets/[id]/page.tsx +++ b/frontend/src/app/markets/[id]/page.tsx @@ -7,7 +7,7 @@ import { useWallet } from "@/hooks/useWallet"; import { useToken } from "@/hooks/useToken"; import { pollMarketEvents } from "@/services/events"; import { getXlmBalance } from "@/services/soroban"; -import { displayXLM, formatXLM, calculatePayout, truncateAddress } from "@/utils/helpers"; +import { displayXLM, formatXLM, calculatePayout, truncateAddress, formatDate } from "@/utils/helpers"; import { WIN_POINTS, LOSE_POINTS, @@ -319,7 +319,7 @@ export default function MarketDetailPage({ - {new Date(evt.timestamp * 1000).toLocaleTimeString()} + {formatDate(evt.timestamp)} ))} diff --git a/frontend/src/utils/helpers.ts b/frontend/src/utils/helpers.ts index 4688130..e8d0a12 100644 --- a/frontend/src/utils/helpers.ts +++ b/frontend/src/utils/helpers.ts @@ -78,7 +78,7 @@ export function timeUntil(timestamp: number): string { * Format a Unix timestamp to a locale-aware date string. */ export function formatDate(timestamp: number): string { - return new Date(timestamp * 1000).toLocaleDateString("en-US", { + return new Date(timestamp * 1000).toLocaleDateString(undefined, { year: "numeric", month: "short", day: "numeric",