Repository navigation
Conversation
Schedule-X v4 defaults the calendar timezone to UTC, but events were built in the browser's local zone, so every class was shifted by the local UTC offset (e.g. +8h in Pacific) and fell outside the visible dayBoundaries. Use a fixed zone for both events and the calendar. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Problem
Since the Schedule-X migration, added courses don't appear on the calendar for anyone outside UTC. The course card shows up, but the week grid stays empty.
Repro on caltech.dev (browser in Pacific time): add Ma 102 (MWF 10:00–10:55, R 09:00–09:55). The events exist in the DOM but are labelled 6:00 PM / 5:00 PM and positioned at
top: 128%, below the visible grid.Cause
In
src/Planner.tsx:Temporal.ZonedDateTimein the browser's zone (Temporal.Now.timeZoneId())useCalendarAppdoesn't settimezone, so Schedule-X uses its default, UTC, and converts every event into it (+8h for Pacific in January 2018)dayBoundaries/gridHeightare computed from the local hours, so the shifted events fall outside the rendered rangeUsers east of UTC get the opposite shift.
Fix
Catalog times are floating wall-clock times, so use one fixed zone (
"UTC") for both the events and the calendar (timezone: timeZone). That's 5 lines, no dependency changes, and it doesn't touch the.icsexport, which handlesAmerica/Los_Angelesseparately inWorkspace.tsx.This is a minimal alternative to reverting the whole modernization stack (#180): the new stack works once the timezone mismatch is fixed.
Testing
npm run buildpasses🤖 Generated with Claude Code