How to simulate different timezones in Chrome
Jul 13, 2025 am 12:19 AMTo test page behavior in different time zones in Chrome browser, there are three ways to do it. 1. Use Chrome DevTools to simulate the time zone: Open DevTools → Click Three Dots → More Tools → Sensors, check the overwrite option in the Date and Time section and select the target time zone. This setting only takes effect in the current session; 2. Specify the time zone through the command line startup parameters: After closing all Chrome instances, execute chrome.exe --timezone="target time zone" to affect the entire browser instance; 3. Use JavaScript to overwrite the behavior of the Date object. Fixed time values are used to accurately control the JS time logic, suitable for debugging and automated testing. Just choose the appropriate method according to the usage scenario.
Want to test page behavior in different time zones in Chrome browser? In fact, the method is quite straightforward, especially suitable for international projects or debugging cross-regional functions. There is no need to install particularly complicated tools, just use the functions and some tips that come with the browser.

Simulate time zones with Chrome DevTools
Chrome's own developer tools (DevTools) support temporary modification of the browser's time zone, which is very useful for front-end debugging.
- Open DevTools: Shortcut key
F12
or right-click the page to select "Check" - Click the three dots in the upper right corner → More Tools → Sensors
- Check "Override Geolocation" and "Override Date/Time" in the Date and Time section
- After checking, a drop-down box will appear, where you can directly select the time zone, such as Asia/Shanghai, America/New_York, etc.
Note: This setting only takes effect in the current DevTools session. Refreshing the page will retain the time zone you selected, but after closing DevTools, the default will be restored.
![]()
Specify the time zone through command line startup parameters
If you want the entire browser instance to run in a specific time zone instead of just emulating in DevTools, it can be done by starting parameters.
- Close all Chrome instances
- Find the installation path of Chrome (usually
C:\Program Files\Google\Chrome\Application\chrome.exe
under Windows) - Execute the command:
chrome.exe --timezone="Asia/Tokyo"
You can replace "Asia/Tokyo"
with any IANA-supported time zone name.

This method is suitable for Windows, macOS, and Linux, but requires permission to start the browser from the command line. In addition, this method will affect the behavior of the entire browser, not just the current page.
Temporary simulation time with JavaScript
Sometimes you want to control the time objects obtained by JS, rather than the system time of the entire browser. At this time, you can use code to overwrite the behavior of the Date object.
For example:
const originalDate = Date; Date = class extends Date { constructor(...args) { if (args.length === 0) { super('2025-04-05T12:00:00Z'); // Fix one time} else { super(...args); } } };
After writing this way, any place where new Date() is called will return the time you set, which is equivalent to forcing the "deception" page to think that now is a certain point in time. Suitable for automated testing or temporary debugging.
Basically these are the methods. Choose the right method according to your needs: simple debugging is the most convenient; long-term testing can be done using the command line; precise control of JS time logic depends on code rewriting Date. Several methods are not complicated, but they are particularly practical in actual development.
The above is the detailed content of How to simulate different timezones in Chrome. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Every application you run on Windows has a component program to update it. So if you are using Google Chrome or Google Earth, it will run a GoogleUpdate.exe application, check if an update is available, and then update it based on the settings. However, if you no longer see it and instead see a process updater.exe in the Task Manager of Windows 11/10, there is a reason for this. What is Updater.exe in Windows 11/10? Google has rolled out updates for all its apps like Google Earth, Google Drive, Chrome, etc. This update brings

crdownload is a chrome browser download cache file, which is a file that has not been downloaded; crdownload file is a temporary file format used to store files downloaded from the hard disk. It can help users protect file integrity when downloading files and avoid being damaged. Unexpected interruption or stoppage. CRDownload files can also be used to back up files, allowing users to save temporary copies of files; if an unexpected error occurs during downloading, CRDownload files can be used to restore downloaded files.

Chrome's inability to load plug-ins can be solved by checking whether the plug-in is installed correctly, disabling and enabling the plug-in, clearing the plug-in cache, updating the browser and plug-ins, checking the network connection, and trying to load the plug-in in incognito mode. The solution is as follows: 1. Check whether the plug-in has been installed correctly and reinstall it; 2. Disable and enable the plug-in, click the Disable button, and then click the Enable button again; 3. Clear the plug-in cache, select Advanced Options > Clear Browsing Data, check cache images and files and clear all cookies, click Clear Data.

What is the Chrome plug-in extension installation directory? Under normal circumstances, the default installation directory of Chrome plug-in extensions is as follows: 1. The default installation directory location of chrome plug-ins in windowsxp: C:\DocumentsandSettings\username\LocalSettings\ApplicationData\Google\Chrome\UserData\Default\Extensions2. chrome in windows7 The default installation directory location of the plug-in: C:\Users\username\AppData\Local\Google\Chrome\User

What should I do if the Google Chrome web page cannot be opened? Many friends like to use Google Chrome. Of course, some friends find that they cannot open web pages normally or the web pages open very slowly during use. So what should you do if you encounter this situation? Let’s take a look at the solution to the problem that Google Chrome web pages cannot be opened with the editor. Solution to the problem that the Google Chrome webpage cannot be opened. Method 1. In order to help players who have not passed the level yet, let us learn about the specific methods of solving the puzzle. First, right-click the network icon in the lower right corner and select "Network and Internet Settings." 2. Click "Ethernet" and then click "Change Adapter Options". 3. Click the "Properties" button. 4. Double-click to open i

Chrome means browser, a web browser developed by Google. It was first released in 2008 and quickly became one of the most popular browsers in the world. Its name comes from the browser's interface design because of its iconic The feature is the tab bar at the top of the window, and the appearance of this tab bar is very similar to chrome metal.

This tutorial shows you how to find specific text or phrases on all open tabs in Chrome or Edge on Windows. Is there a way to do a text search on all open tabs in Chrome? Yes, you can use a free external web extension in Chrome to perform text searches on all open tabs without having to switch tabs manually. Some extensions like TabSearch and Ctrl-FPlus can help you achieve this easily. How to search text across all tabs in Google Chrome? Ctrl-FPlus is a free extension that makes it easy for users to search for a specific word, phrase or text across all tabs of their browser window. This expansion

chromesetup is a Google browser installation program; Google Chrome is a simple and efficient web browsing tool developed by Google. It is characterized by simplicity and speed. Chrome supports multi-tab browsing, and each tab page is in Running in an independent "sandbox" improves security, and the crash of one tab page will not cause other tab pages to be closed.
