From 3d78ff7863eeea560b2429f727e9ce5fcbb18970 Mon Sep 17 00:00:00 2001 From: adam Date: Tue, 29 Sep 2026 17:50:37 +0000 Subject: [PATCH] show board dates in UTC on the website Board days are UTC epoch days (midnight UTC), but toLocaleDateString formatted them in the viewer's timezone, so anyone west of UTC saw every game dated the day before. Format them in UTC. Co-Authored-By: Claude Opus 5.5 --- www/html/wordle/game.html | 3 +++ www/html/wordle/games.html | 3 +++ 2 files changed, 6 insertions(+) diff --git a/www/html/wordle/game.html b/www/html/wordle/game.html index 5c829c0..c490f53 100644 --- a/www/html/wordle/game.html +++ b/www/html/wordle/game.html @@ -316,8 +316,11 @@ async function loadBoard() { // If we know the exact epoch day and haven't set date text yet, show it if (finalEpoch !== null && !dateEl.textContent) { + // Epoch days start at midnight UTC, so format in UTC or viewers + // west of UTC see the previous day dateEl.textContent = new Date(finalEpoch * 86400 * 1000) .toLocaleDateString(undefined, { + timeZone: "UTC", weekday: "long", year: "numeric", month: "long", diff --git a/www/html/wordle/games.html b/www/html/wordle/games.html index 705a53e..bdf1ac0 100644 --- a/www/html/wordle/games.html +++ b/www/html/wordle/games.html @@ -134,8 +134,11 @@