DEV Community ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป

DEV Community ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป is a community of 963,274 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
Cover image for How to spoof your timezone in Google Chrome
Aileen Rae
Aileen Rae

Posted on • Updated on • Originally published at aileenrae.co.uk

How to spoof your timezone in Google Chrome

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

If you're viewing this in Chrome, try it out now and take a look at the current time displayed in the Codepen below.

Top comments (7)

Collapse
 
z0ccc profile image
z0ccc • Edited on

You can also use the 'Vytal' extension to spoof your timezone, locale, geolocation and user agent. It can automatically set your location data to match your ip address.

chrome.google.com/webstore/detail/...

Collapse
 
macsikora profile image
Pragmatic Maciej

Hey, just found that when needed it most. Tnx

Collapse
 
conorluddy profile image
Conor

Really useful, thanks Aileen

Collapse
 
aileenr profile image
Aileen Rae Author

Thanks Conor, I'm glad this helped! Chrome DevTools has so many useful features like this that can be so hidden unless you know where to look.

Collapse
 
dandv profile image
Dan Dascalescu

Cool feature, right? I wanted it too back in 2019 so I submitted a feature request for it. You're welcome :)

Collapse
 
aileenr profile image
Aileen Rae Author

That's awsome Dan, thanks for making the feature request. Dev work involving timezones is always a nightmare but the timezone selector has certainly eased that pain a little!

Collapse
 
iam_mayuresh profile image
Mayuresh Srivastava • Edited on

Where can I get right data for adding a new one. I mean the right Latitude, Longitude, Timezone ID and Locale?

๐ŸŒš Friends don't let friends browse without dark mode.

Sorry, it's true.