fix(universal): project show showtimes into park-local timezone#193
Merged
Conversation
The CDN /shows/show-list.json feed emits UTC ISO strings (e.g. 2026-05-25T20:30:00.000Z). The /places migration in #191 passed those through unchanged, but downstream displays were rendering the Z string in local time and showing all showtimes as "after park close" — e.g. Shrek's Swamp Meet (UOR USF) displayed as 8:30 PM instead of 4:30 PM EDT. The legacy pre-/places code emitted park-local ISO with offset via constructDateTime(date, time, this.timezone). Restore that behaviour by re-projecting each ENABLED show_time through formatInTimezone. parseShowTimes now takes a timezone parameter. Updated the buildLiveData call site (uses this.timezone — UOR: America/New_York, USH: America/Los_Angeles) and the unit tests, which now assert against the expected -04:00 / -07:00 offsets and cover both timezones. Verified live against /places + /shows feeds: Shrek's Swamp Meet emits 2026-05-25T18:20:00-04:00 / 19:20:00-04:00 (6:20 PM / 7:20 PM EDT) instead of the bare-UTC 22:20:00.000Z / 23:20:00.000Z.
Contributor
There was a problem hiding this comment.
Pull request overview
Restores the legacy contract for Universal showtime emission by converting CDN show_times[].start_time values (UTC ISO ...Z) into park-local ISO strings with an explicit offset, preventing downstream consumers from mis-rendering showtimes as “after park close”.
Changes:
- Updated
parseShowTimes(show, timezone, now?)to re-project each ENABLED future slot viaformatInTimezone(..., timezone, 'iso'). - Updated
buildLiveDatato passthis.timezoneintoparseShowTimes. - Updated/added unit tests to assert the correct
-04:00(Orlando) and-07:00(Hollywood) offsets.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/parks/universal/universal.ts |
Re-project showtime instants from UTC to park-local ISO-with-offset during LiveData build. |
src/parks/universal/__tests__/places.test.ts |
Updates existing showtime expectations and adds a Pacific-timezone projection test. |
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
The CDN
/shows/show-list.jsonfeed (consumed since #191) emits UTC ISO strings like2026-05-25T20:30:00.000Z. The /places migration passed those through unchanged inparseShowTimes. Downstream displays were rendering the bare-UTCZstring in local time and showing all showtimes as after park close — e.g. Shrek's Swamp Meet (UOR USF) displaying as 8:30 PM instead of its real 4:30 PM EDT slot.The pre-/places (legacy) code emitted park-local ISO with an offset via
constructDateTime(date, time, this.timezone). This PR restores that contract by re-projecting each ENABLEDshow_timethroughformatInTimezoneinparseShowTimes.Was it always like this?
No — the legacy POI-based show-time code emitted park-local ISO strings with offsets (e.g.
2026-05-25T16:30:00-04:00). The /places migration in #191 inadvertently changed this to bare UTC because the CDN feed already provides ISO-with-Z and I passed it straight through. This restores the legacy emission shape.Verification (live
/places+ CDN feeds)2026-05-25T20:30:00.000Z2026-05-25T16:30:00-04:002026-05-25T21:40:00.000Z2026-05-25T17:40:00-04:002026-05-25T22:00:00.000Z2026-05-25T18:00:00-04:00All landing in real-world plausible park-open windows.
Changes
parseShowTimes(show, timezone, now?)— addedtimezoneparameter, projects each slot throughformatInTimezone(t, timezone, 'iso').buildLiveDatacall site now passesthis.timezone.-04:00offsets.Test plan
npm test→ 1106 / 1106 (1 new test for the Hollywood timezone path)npm run dev -- universalorlando4/4npm run dev -- universalstudios4/4🤖 Generated with Claude Code