timezone-mock

JSON →
library 1.4.2 ·javascript
verified May 9, 2026

A JavaScript library to mock the local timezone for testing purposes. Version 1.4.2 is current stable, with infrequent releases. It replaces the global Date constructor with a mocked version that behaves as if in a specified timezone, including DST transitions. Key differentiators: lightweight, no dependencies, supports multiple timezones (US/Pacific, US/Eastern, Brazil/East, UTC, Europe/London, Australia/Adelaide) and GMT offsets, and includes TypeScript types. Unlike full timezone libraries, it focuses solely on mocking for testing, not on timezone conversions or comprehensive data.

total hits 8
actors 3 distinct systems
last hit 3d ago Bingbot
MetaBot
3
Search engines
1
Humans
1

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇬🇧 United Kingdom