Repository navigation
Event time fixes - #1393
Open
stain wants to merge 6 commits into
Open
Event time fixes#1393stain wants to merge 6 commits into
stain wants to merge 6 commits into
Conversation
This was referenced Oct 23, 2026
…d JSON-API
TeSS stores an event's start and end as local (wall clock) time in a
UTC column, with the zone in timezone. Bioschemas startDate/endDate
gave that time with Time#to_s ("2026-10-22 09:00:00 UTC", not ISO
8601) and JSON-API as "2026-10-22T09:00:00.000Z", both presenting the
local time as UTC: an event at 09:00 in Buenos Aires was given as 09:00
UTC rather than 12:00 UTC.
Give them in ISO 8601 with the offset of the event's time zone on that
date (Event#local_iso8601), e.g. "2026-10-22T09:00:00-03:00", or
without an offset, as local time, when the time zone is unknown. The
legacy JSON API is left unchanged.
See ElixirTeSS#1391
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TeSS stores event times as local (wall clock) time, with the zone in the event's timezone. The iCalendar, Indico and Gray Scott ingestors stored DTSTART;TZID=... times converted to UTC instead, so e.g. a 09:45 event in Perth was shown as 01:45 Perth time, and exported to iCal and Google Calendar 8 hours early. All-day dates became midnight in the server's time zone. Store the local time of the calendar (Ingestor#ical_local_time). Upcoming events are corrected when their source is ingested again. The ingestor tests now check the actual UTC time (start_utc) and the local time with its offset, rather than the stored column. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The new event form defaulted to 09:00-17:00 in the server's system time zone (DateTime.now), giving e.g. 00:00-08:00 on a server in Tokyo, and the event calendar used the server's date (Date.today). Use the application time zone (Time.zone.now, Date.current). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Events without a time zone were exported to iCal and Google Calendar as UTC, so e.g. a 09:00-17:00 event in Australia appeared from 20:00 to 04:00 the next day. Export them as floating local times (DTSTART:20261105T090000), which calendars show at the same clock time and day in their own time zone, assuming people are near the event. The Google Calendar link now gives the IANA time zone (ctz=Australia/Perth rather than Perth). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A short developer note on local (wall clock) storage with a separate time zone, exports, default times, and what ingestors and their tests need to do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
stain
force-pushed
the
event-time-fixes
branch
from
October 23, 2026 08:03
a05dd8d to
7ffd2b7
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.
Summary of changes
Bug fixes for event times, with no new dependencies or migrations:
(
2026-10-22T09:00:00-03:00), or without an offset when the time zone is unknown, instead of the stored localtime labelled as UTC (
2026-10-22 09:00:00 UTC,…T09:00:00.000Z). The legacy JSON API is unchanged (see below).stored
DTSTART;TZID=…converted to UTC, so e.g. a 09:45 event in Perth showed as 01:45, and was exported toiCal/Google Calendar 8 hours early. Upcoming events are corrected when their source is next ingested.
DTSTART:20261105T090000), so calendarsshow them on the right day, rather than as UTC (a 09:00–17:00 event in Australia ended at 04:00 the next day).
The Google Calendar link gives the IANA zone (
ctz=Australia/Perth, wasPerth).DateTime.now) and the event calendar(
Date.today).docs/timezones.md: how event times and time zones are stored, and what ingestors need to do.Motivation and context
Fixes most of #1391. TeSS stores
start/endas local (wall clock) time with the zone intimezone, but severaloutputs and ingestors treated the stored value as UTC.
Question
The legacy JSON API (
events.json) still gives the stored local time as UTC (…T09:00:00.000Z). Should it get thesame fix? It is ready, without new keys, as one commit on
event-time-fixes-legacy-json.Tests
Updated and new tests for the outputs, ingestors (checking
start_utcrather than the stored column), exports andserver time zones. Full suite passes.
Checklist
🤖 Generated with Claude Code