Show match times in Argentina timezone

This commit is contained in:
2026-06-11 23:52:43 -03:00
parent cdb0e30f6a
commit 1a1568eb10
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -94,7 +94,7 @@ export default function AdminPage() {
const homeName = m.homeTeam?.shortName ?? m.homeLabel ?? '?' const homeName = m.homeTeam?.shortName ?? m.homeLabel ?? '?'
const awayName = m.awayTeam?.shortName ?? m.awayLabel ?? '?' const awayName = m.awayTeam?.shortName ?? m.awayLabel ?? '?'
const s = scores[m.id] ?? { home: '', away: '' } const s = scores[m.id] ?? { home: '', away: '' }
const date = new Date(m.scheduledAt).toLocaleDateString('es-AR', { day: '2-digit', month: 'short', hour: '2-digit', minute: '2-digit' }) const date = new Date(m.scheduledAt).toLocaleDateString('es-AR', { day: '2-digit', month: 'short', hour: '2-digit', minute: '2-digit', timeZone: 'America/Argentina/Buenos_Aires' })
return ( return (
<div key={m.id} className="bg-white rounded-2xl border border-gray-100 shadow-sm p-4"> <div key={m.id} className="bg-white rounded-2xl border border-gray-100 shadow-sm p-4">
+3 -2
View File
@@ -16,8 +16,9 @@ export function MatchCard({ match, onPredict, saving }: MatchCardProps) {
const finished = match.status === 'FINISHED' const finished = match.status === 'FINISHED'
const date = new Date(match.scheduledAt) const date = new Date(match.scheduledAt)
const dateStr = date.toLocaleDateString('es-AR', { day: '2-digit', month: 'short' }) const tz = { timeZone: 'America/Argentina/Buenos_Aires' }
const timeStr = date.toLocaleTimeString('es-AR', { hour: '2-digit', minute: '2-digit' }) const dateStr = date.toLocaleDateString('es-AR', { day: '2-digit', month: 'short', ...tz })
const timeStr = date.toLocaleTimeString('es-AR', { hour: '2-digit', minute: '2-digit', ...tz })
const homeName = match.homeTeam?.shortName ?? match.homeLabel ?? '?' const homeName = match.homeTeam?.shortName ?? match.homeLabel ?? '?'
const awayName = match.awayTeam?.shortName ?? match.awayLabel ?? '?' const awayName = match.awayTeam?.shortName ?? match.awayLabel ?? '?'