DEV Community

Cover image for How to spoof your timezone in Google Chrome

How to spoof your timezone in Google Chrome

Aileen Rae
A full-stack web developer with a particular fondness for VueJS. She/her.
・1 min read

Today I learned: you can spoof your timezone in Google Chrome without needing to change your system settings.

I was implementing user timezone preferences for a CMS product when I learned about this, much to my relief. I had been anticipating having to change my system settings over and over again as I tested how my datetime formatting behaved in different timezones.

So how do you do it?

  1. Open DevTools in Chrome (F12).
  2. If not already shown, open the Console drawer (esc).
  3. Click the three, vertically-aligned dots at the top-left of the console drawer (⋮).
  4. In the dropdown menu, select Sensors. Google Chrome Sensors tab
  5. In the new Sensors tab, you can change your location to one of the presets, or choose "Other..." to manually enter a timezone. Google Chrome Sensors Geolocation option

Try it out now and take a look at the current time displayed in the Codepen below.

Discussion (1)

conorluddy profile image

Really useful, thanks Aileen