Skip to content

fix(base): show dates in one fixed time zone on server and client - #646

Merged
TheMeinerLP merged 1 commit into
mainfrom
fix/timezone-safe-dates
Nov 23, 2026
Merged

TheMeinerLP merged 1 commit into
mainfrom
fix/timezone-safe-dates

Conversation

@TheMeinerLP

Copy link
Copy Markdown
Collaborator

Problem

Blog publication dates are stored as UTC midnight. The server rendered them in UTC, but the visitor's browser rendered them in local time. Visitors west of UTC saw the previous day, and the page hydrated with different text than it was served with. Date formatting existed in about eight variants with inconsistent time-zone handling.

Fix

One small formatter in the base layer with an explicit zone: calendar dates such as publication dates are formatted in UTC, real instants such as API timestamps in Europe/Berlin, as the events layer already does. The blog cards, article page, author list, community POI metadata, home carousel cards and the OpenCollective "updated" label use it; the duplicated carousel date logic is gone.

Proposal: openspec/changes/fix-timezone-safe-dates (#641).

Tests

Formatter tests with fixed dates in both locales (independent of the machine's time zone), plus a repository rule that fails when a date call without a time zone is added in layers/ or pages/. Tests, quality gate (no rise) and production build pass.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
launchpad 0a00c87 Commit Preview URL

Branch Preview URL
Nov 22 2026, 11:12 PM

@TheMeinerLP
TheMeinerLP merged commit 7244b6c into main Nov 23, 2026
14 checks passed
@TheMeinerLP
TheMeinerLP deleted the fix/timezone-safe-dates branch November 23, 2026 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant