ADR-0101 — A stored wall-clock reading is a floating time, never a guessed offset
Status: Accepted · Date: 2026-08-29 · Track: 008-card-view, phase 02
Context
Phase 02 gives events a public page and a generated .ics, on
ADR-0099's
shape. Both have to answer a question the vCard never raised: what time does
this event happen at?
What is stored is not an instant. The editor collects the start and end with
<input type="datetime-local">, so settings.event_start_datetime holds a
wall-clock reading — "2026-09-15T18:00" — with no offset in it at all.
Alongside it sits event_timezone, a named zone the author may or may not have
set.
Three encodings were available for the calendar file, and the page has the same three:
- Coerce to UTC. Read the stored value in some zone — the server's, the
viewer's — and emit
20260915T170000Z. - Floating time. Emit
20260915T180000with no zone marker. RFC 5545 §3.3.5 defines this as local to whoever reads it. - Local time with a TZID. Emit
DTSTART;TZID=Europe/London:20260915T180000when the author named a zone.
Option 1 is the one that looks most rigorous and is the least honest. The
offset it applies is invented: the server's zone is an accident of deployment,
and the viewer's is an accident of who opened the link. Applied on the page in
the obvious way — new Date("2026-09-15T18:00") — it reads the value in the
viewer's zone, so a launch at 18:00 in London shows as 13:00 to a reader in
New York and 02:00 the next day in Auckland. Every one of those is a
confidently-stated wrong answer.
Decision
The stored reading is emitted as written. The zone travels beside it when the author set one, and is never applied to the value.
In the .ics:
event_timezoneset and resolvable →DTSTART;TZID=<zone>:20260915T180000. The value stays local, which is what the author meant and what survives a daylight-saving boundary — the whole reason TZID exists rather than a fixed offset.- No zone, or a zone the server cannot resolve → a floating time, no TZID
and no trailing
Z. - A zone string
time.LoadLocationrejects is dropped, not passed through. A TZID no client can look up looks authoritative and is not; a floating time is the weaker claim and the true one. DTSTAMPis the one genuinely-UTC property in the file. It stamps the file, not the event.
On the page, the same rule with the same consequence: the components are parsed
out of the stored string, a UTC instant is built from them, and it is formatted
with timeZone: 'UTC' — so the numbers rendered are the numbers typed,
wherever it is read. The zone name is shown as its own line, as a label. Never
as a conversion.
A datetime the parser does not recognise yields no property at all rather than a guess. An event with no readable start is an event whose start this system does not know, and saying so is cheaper than saying something false.
Consequences
- An event reads the same to every visitor, which is what an author who typed a wall-clock time into a form meant.
- A calendar client importing the
.icsplaces a zoned event correctly and a zoneless one at the reader's own 18:00 — the RFC's own semantics, not this system's invention. - This is a rendering decision and changes no storage. If events later gain a true instant — a zone-aware picker, or a stored offset — that is a schema change and a new decision; until then no renderer may manufacture one.
- The escaping and folding the file needs are not decisions and live in code: RFC 5545 §3.3.11 text escaping (a note with a comma is the ordinary case, and unescaped it truncates the property) and §3.1 line folding at 75 octets on rune boundaries.
- Phase 05's card summarises these same fields and inherits this rule: a card that re-derived a time would contradict the page it summarises.
Source: docs/decisions/0101-a-stored-wall-clock-reading-is-a-floating-time-never-a-guessed-offset.md