fix(explore): make the parking clamp test independent of the runner timezone - #486
Merged
Conversation
…imezone Same fault as the three fixed in #485: the expectation was written as a fixed `+10:00` offset while the clamp applies `bookable_hours` with `Date#setHours`, which is machine-local. On a UTC runner the expected period start came out exactly ten hours adrift, so `nx test explore` failed for anyone outside eastern Australia — including CI, whenever a change touched this library. Input and expectations are now all built from local components. Found by sweeping every app and library under UTC and Pacific/Honolulu after #485; this was the only remaining case. Verified green under UTC, Australia/Sydney, America/New_York, Pacific/Honolulu and Asia/Kolkata. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Deployment failed with the following error: Learn More: https://vercel.com/placeos?upgradeToPro=build-rate-limit |
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.
Follow-up to #485. After fixing the three timezone-pinned tests there, I swept every app and library under
TZ=UTCandTZ=Pacific/Honoluluto find any others. This was the only one left.Same fault: the expectation is a fixed
+10:00offset, but the clamp appliesbookable_hoursviaDate#setHours, which is machine-local. On a UTC runner the expectedperiod_startwas exactly ten hours adrift, sonx test explorefailed for anyone outside eastern Australia — and in CI whenever a change touched this library.That difference is 36000 seconds. Ten hours.
Verification
exploregreen under UTC, Australia/Sydney, America/New_York, Pacific/Honolulu and Asia/Kolkata.The rest of the sweep came back clean — apps (
app-loader,assistant-panel,booking-panel,caterer-ui,concierge,control,enrolment,map-kiosk,outlook-addin,public,redirect,signage,signage-manager,stagehand,survey,timetable,visitor-kiosk,workplace) and libraries (assets,bookings,catering,common,components,events,form-fields,mocks,payments,users) all pass with no unhandled errors.🤖 Generated with Claude Code