A Chrome extension to change the current date and time seen by websites. You can use it to debug time-dependent frontend/JavaScript applications without having to change the system time.
- Switch to the tab where you want to to change the time
- Click the extension icon in the toolbar.
- Enter the date and time you want to set and confirm, e.g.:
- "2023-04-27 12:40" (local time)
- "2023-04-27" (midnight local time)
- "2023-04-27T12:40Z" (UTC)
- When first activating the extension on a tab, click Reload when prompted.
- 🎉 Any JavaScript
Date
object in the current tab now returns the fake date/time you set.
To restore the system time, click the extension icon and press Reset.
When the fake time is turned on, the clock is paused by default. You can press the play (▶) button to make the fake clock tick forward at a normal rate. Press stop (⏹) to pause the clock.
- Only Chrome / Chromium support (for now)
- Only JavaScript is affected by the extension.
- The extension does not work in iframes with the
sandbox
attribute
Get it from the Chrome Web Store: https://chrome.google.com/webstore/detail/time-travel/jfdbpgcmmenmelcghpbbkldkcfiejcjg
To build and use a local version:
- Download this repository
- Run
npm install
- Run
npm run dev
(ornpm run build
for a production version) - Open chrome://extensions
- Enable 'Developer Mode'
- Click 'Load unpacked' and select the
dist/
directory