Simulate Different Timezone in Chrome Browser
When your web app are used by users in a multiple timezone, you might need to simulate the timezone, sometimes we need that to test a specific feature, or when you need to reproduce a bug related to multiple timezone implementation
How to do that? Fortunately, we can simulate that directly in Chrome:
1. Open Developer Tools -> Open Hamburger Menu -> More Tools -> Sensors
2. Open Sensors
On the first time, Sensors menu can be show at the bottom part of the developer tools, if that happened, right click on the Sensors -> Move to Top
We can see the Sensors menu after that in Developer Tools toolbar
3. Change the Location
You can also add a new Location by clicking Manage button
4. Test the results
Open developer tools console tab, type
console.log(Intl.DateTimeFormat().resolvedOptions().timeZone)
to check the current browser timezone.
You can see that when i change the timezone multiple time, it will be applied instantly
That's all!
Comments