Skip to content

fix(universal): project show showtimes into park-local timezone#193

Merged
cubehouse merged 1 commit into
mainfrom
fix/universal-show-timezone
May 25, 2026
Merged

fix(universal): project show showtimes into park-local timezone#193
cubehouse merged 1 commit into
mainfrom
fix/universal-show-timezone

Conversation

@cubehouse
Copy link
Copy Markdown
Member

Summary

The CDN /shows/show-list.json feed (consumed since #191) emits UTC ISO strings like 2026-05-25T20:30:00.000Z. The /places migration passed those through unchanged in parseShowTimes. Downstream displays were rendering the bare-UTC Z string 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 ENABLED show_time through formatInTimezone in parseShowTimes.

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)

Show Before After
Shrek's Swamp Meet 2026-05-25T20:30:00.000Z 2026-05-25T16:30:00-04:00
Raptor Encounter (IOA) 2026-05-25T21:40:00.000Z 2026-05-25T17:40:00-04:00
Le Cirque Arcanus (EU) 2026-05-25T22:00:00.000Z 2026-05-25T18:00:00-04:00

All landing in real-world plausible park-open windows.

Changes

  • parseShowTimes(show, timezone, now?) — added timezone parameter, projects each slot through formatInTimezone(t, timezone, 'iso').
  • buildLiveData call site now passes this.timezone.
  • 1 new unit test (Pacific timezone projection for Hollywood) plus the existing tests updated to assert -04:00 offsets.

Test plan

  • npm test → 1106 / 1106 (1 new test for the Hollywood timezone path)
  • npm run dev -- universalorlando 4/4
  • npm run dev -- universalstudios 4/4
  • Verified live against the CDN feed for Shrek's Swamp Meet and others

🤖 Generated with Claude Code

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.
Copilot AI review requested due to automatic review settings May 25, 2026 21:37
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 via formatInTimezone(..., timezone, 'iso').
  • Updated buildLiveData to pass this.timezone into parseShowTimes.
  • 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.

@cubehouse cubehouse merged commit 783e063 into main May 25, 2026
5 checks passed
@cubehouse cubehouse deleted the fix/universal-show-timezone branch May 25, 2026 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants