Files
hoerdle/lib/dateUtils.ts
Hördle Bot 4f8524c286 Fix daily puzzle rotation timezone issue
- Added lib/dateUtils.ts for consistent timezone handling
- Updated app/page.tsx and app/api/daily/route.ts to use Europe/Berlin timezone
- Updated lib/gameState.ts to sync client-side daily check with server time
- Exposed TZ env var to client in next.config.ts
2025-11-22 00:44:14 +01:00

9 lines
254 B
TypeScript

export function getTodayISOString(timezone = process.env.TZ || 'Europe/Berlin'): string {
return new Date().toLocaleDateString('en-CA', {
timeZone: timezone,
year: 'numeric',
month: '2-digit',
day: '2-digit'
});
}