Skip to content

test(snapshot): pin test calendar to UTC#29

Merged
Periicles merged 1 commit into
mainfrom
test/pin-calendar-timezone
Jul 13, 2026
Merged

test(snapshot): pin test calendar to UTC#29
Periicles merged 1 commit into
mainfrom
test/pin-calendar-timezone

Conversation

@Periicles

@Periicles Periicles commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Why

SnapshotComputationTests used Calendar(identifier: .gregorian) with no explicit time zone, so it defaulted to the runner's local zone. The snapshot day-boundary logic (startOfDay, upcomingToday vs upcomingLater) is timezone-sensitive — a CI runner in a different zone than the author's machine could land on a different calendar day and flip a boundary assertion. Pre-existing exposure flagged in the stack's final review.

What

One-line fix: pin the test calendar to UTC. Verified green under default, TZ=Asia/Tokyo (UTC+9), and TZ=America/Los_Angeles (UTC-8). 56/56 tests pass.

The snapshot day-boundary logic (startOfDay, upcomingToday vs upcomingLater)
is timezone-sensitive. The test calendar previously used the machine's local
zone, so a CI runner in a different timezone could compute a different day
boundary than the author's machine. Pinning to UTC makes the suite
deterministic. Verified green under UTC, Asia/Tokyo, and America/Los_Angeles.
@Periicles Periicles self-assigned this Jul 13, 2026
@Periicles
Periicles merged commit ae5a531 into main Jul 13, 2026
3 checks passed
@Periicles
Periicles deleted the test/pin-calendar-timezone branch July 13, 2026 08:44
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.

1 participant