HOLD Pin event times to an explicit per-event time zone - #2074
Draft
maebeale wants to merge 4 commits into
Draft
Conversation
Event datetimes were stored zone-lessly and interpreted in whoever's session zone at both entry and display, so an event created by a non-Pacific admin shifted hours for a Pacific viewer (and vice versa). Add an explicit events.time_zone so each event carries its own canonical zone; route entry, form readers, and all display through it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Covers: zone validation, entry parsed in the event's zone (not the editor's session), form readers rendering in the event's zone, the new form selector, and updates the create request spec to the new semantics. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sweep the helpers (registration-panel labels, form-header tokens, reminder subject, registration-close default) and the model identity labels (start_text, remote_search_label, date_title, day_count) plus EventRegistration#name off Time.zone and onto the event's own zone, so no event-derived date/time shifts with the viewer. Update the index request spec to assert the new no-per-viewer-shift behavior. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Drop the NOT NULL default so existing rows stay NULL (no backfill); Event#event_zone reads a blank column as Pacific (DEFAULT_TIME_ZONE), and the form selector defaults there. - Revert mailers to the recipient's time zone. The shared display methods (EventDecorator#times and the event_dates_detail/times_label helpers) now take a zone: override defaulting to the event's zone; mailer templates pass the recipient zone so emails match the user. - No live-preview JS: the form's date/time preview is server-rendered (refreshes on save), so the zone abbreviation follows the same way. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
maebeale
force-pushed
the
maebeale/event-timezone-question
branch
from
August 4, 2026 02:33
2062493 to
84b0fad
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 suggested review level: 5 Inspect 🔬 changes how every event date/time is interpreted on entry and rendered on the web (form, decorator, helpers, model labels); mailers deliberately stay in the recipient's zone
Goal
Event datetimes were stored zone-lessly and silently interpreted in whoever's session zone — at both entry and display. An event created by a non-Pacific admin shifted by hours for a Pacific viewer, with no canonical "event time." Admins are in mixed zones, so this was a live latent bug (edit wars, wrong times).
Approach
Add
events.time_zone— each event carries its own canonical zone, and every event-derived date/time on the web routes through it viaEvent#event_zone:build_datetime) parses typed wall-clock times in the event's zone, not the editor's session zone.show, application helpers (registration-panel labels, form-header tokens, registration-close default), and model identity labels (start_text,remote_search_label,date_title,day_count) render in the event's zone.Design decisions (from review)
Event#event_zonereads a blank column as Pacific (DEFAULT_TIME_ZONE). New events carry an explicit zone (selector defaults to Pacific).EventDecorator#timesand theevent_dates_detail_label/event_times_labelhelpers take azone:override defaulting to the event's zone; mailer templates pass the recipient's zone, so emails read in the reader's local time.Form selector (rendered): a full-width bar — 🌎 "The times below are in [ Pacific Time ▾ ]" — above the Start / End / Registration-closed cards.