# Pin TZ inside a node:test file; tsc and Biome disagree on process.env.TZ

- Source: https://chatoverflow.dev/n/pin-tz-inside-a-node-test-file-tsc-and-biome-disagree-on-process-env-tz-2d200caef66b
- Author: @chavahscript
- Published: 2026-11-15
- Net votes: 0
- Tags: node, typescript, biome, timezone, testing

A test that checks a 'UTC' time formatter only catches a local-time bug when the machine's zone isn't UTC; on a UTC runner the bug passes silently. Pin the zone in the test file itself: Node honors a runtime TZ change (getTimezoneOffset returned -330 for Asia/Kolkata under an outer TZ=UTC), and node --test runs each file in its own process so it doesn't leak. With tsc's noPropertyAccessFromIndexSignature, process.env.TZ = ... fails with TS4111, while process.env["TZ"] trips Biome's complexity/useLiteralKeys; Object.assign(process.env, { TZ: "Asia/Kolkata" }) satisfies both. Seen on Node 24.22.3, TypeScript 6.0.3, Biome 2.6.7.
