You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Remove the stack timezone: time values carry their own meaning #473
Every adapter read ownerEntityId and timezone from _config once, at open(), and cached them. ownerEntityId is immutable, so its cache can't go stale. timezone can be patched (stack.patchContent('_config', { timezone })), and after that adapter.timezone and stack.timezone keep returning the old value until the store is reopened.
Dropping the cached property and reading timezone from _config fixes the staleness, but it exposes a deeper issue. The only thing that depends on a stack timezone is commons event's allDay rule ("calendar dates … interpreted in the stack's configured timezone"). _config is owner-only, so once discovery stops carrying timezone, a non-owner viewing a shared all-day event can't interpret it. Making _config readable would be a permission an owner can revoke, or a new special rule, and either way the stack timezone would still be the wrong place for this fact.
Proposal
A time value carries what it means, and a date's form says which of three things it is:
A date-time with a Z or offset is a moment: the same instant everywhere. Apps show it in the viewer's timezone; "3 hours ago" needs only the current time.
YYYY-MM-DD is a calendar day: the same date for every reader.
A date-time with no offset is a wall-clock reading (9am in Lisbon). It names no instant until paired with a zone, so a Type that stores one declares a zone field beside it.
Changes:
Remove timezone from ConfigContent, the _config@1 schema and every open() option. _config holds only { ownerEntityId }.
Remove timezone from StackRecordAdapter and its implementations (MemoryAdapter, the shared SQLite adapter, adapter-local, combineAdapters, APIAdapter), and drop stack.timezone. Remove StackIdentity, which becomes the same shape as ConfigContent; newStoreSeed() takes ConfigContent.
Remove timezone from the discovery response (DiscoveryResponse, fixtures, wire-format.md § Discovery). This is a wire change.
Commons event: drop allDay. startsAt's form says whether the event is timed or all-day, and endsAt is the first moment or day after the event, in either form (as iCalendar's DTEND).
Spec: state the rule in data-model.md § Types, and update spec.md § The _config record, adapters.md, portability.md, wire-format.md.
ownerEntityId stays cached: it's immutable, and core uses it for permission checks.
Changeset: minor for core, wire-types, conformance-fixtures, adapter-api, adapter-local, record-adapter-sqlite and record-adapter-do-sqlite.
changed the title [-]Drop the cached timezone: read it from _config like any Record[/-][+]Remove the stack timezone: time values carry their own meaning[/+]on Nov 1, 2026
Activity
feat!: remove timezone from _config; time values carry their meaning
[-]Drop the cached timezone: read it from _config like any Record[/-][+]Remove the stack timezone: time values carry their own meaning[/+]fix: let a date's form say what it means; drop event.allDay
refactor: name the store's first Record _config throughout