how can I hide my "timezone" from sniffing sites?

Some sites I surf and register an account on, can find my location by the "timezone" set on windows, I use Chrome, so how can I block their access to actual timezone ?

Edit: Sorry, Forgot to mention that I use VPN with UK IP, so until recently I always surfed internet like an English, till recently that I found out some sites can know your actual location by your Time-zone.

You can test it yourself: go and register and account on ifttt.com with some VPN / proxy, then go to your account and see that they set your location not by IP, but via your time zone!

The actual problem I had was with some sites that restrict some regions from their service so although you have a VPN with proper IP but they deny their service based on your timezone.

then you spend days wondering how they did it :( ,so after days of testings, finally using "safescript extension" I realized they do it by your time zone!


Solution 1:

It is quite easy to get your system's timezone, as set in the OS, through JavaScript on the browser. Type these in the location/url:

javascript:alert(new Date())   
javascript:alert(new Date().getTimezoneOffset())

The first shows the current time in your timezone, usually with a timezone offset and name, like "GMT-400 (EDT)". If that's too much parsing and math, the second shows minutes behind UTC. So if JavaScript is enabled, the site can get this value and stuff it in a field that gets submitted in a form, or simply send this info back to the server at any time.

So in addition to using a proxy to foil IP geolocation, you also need to disable JavaScript, which might break the site to some degree.

(And there are currently 40 timezones in use, not 24 -- some start at 30 and 45 minutes past the hour from UTC, and a few in the Pacific overlap by a day.)

EDIT: in addition to the timezone, you can also get your locale through the Date and Number objects: the order and separator for year, month, and day; and the thousands and decimal separators. Some combinations of these might, in a few cases, provide country-accurate location (or even slightly better -- it would be interesting to see a matrix of all the combinations).

Even if you could simply stub out Date and Number, that would probably break some useful functionality. So the best approach would be to modify the object prototypes so that they lie and use an arbitrarily chosen timezone and locale. That would require a fair amount of work on Date though; there are several related methods. For example, to force GMT:

Date.prototype.toString = Date.prototype.toGMTString;
Date.prototype.getTimezoneOffset = function() {return 0;};
// and about 10 more

As @barlop suggests, it looks like you can use Privoxy filters to modify the pages before they get to your browser. Due to (1) the way search and replace works with Privoxy, (2) the requirements of the patch, and (3) the flexible nature of HTML: you would have to apply the patch at the beginning of both the <head> and <body> (and even that is not 100% coverage).

Solution 2:

I doubt that very much(that they do it by windows). Maybe they know the timezone at the location of your IP. Or some forums ask you for your timezone and you are telling them. Try changing the time in windows and see if they pick it up - they won't. And if you had multiple computers set to different time zones they won't know. You could hide your IP(so they only see another) but it'll be slow or it'll cost you.