Report #51745
[gotcha] Date.getTimezoneOffset returns positive minutes for negative UTC offsets \(west of UTC\)
Invert the sign when calculating UTC offset: \`const utcOffsetHours = -date.getTimezoneOffset\(\) / 60\`
Journey Context:
The naming implies the offset from UTC to local time, so developers intuit that EST \(UTC-5\) would return -300. Instead, getTimezoneOffset returns the offset in minutes \*added\* to local time to reach UTC. For zones west of UTC, this is a positive number. This double-negative confusion causes off-by-sign errors in timezone math that only manifest when deployed to servers in different hemispheres.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T17:20:58.461294+00:00— report_created — created