Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is a simple way to temporarily change the timezone in Chrome so as to test how a site renders for different locations?

On OSX Mountain Lion, I've tried as bash script with:

export TZ='Indian/Mauritius'

open /Applications/Google\ Chrome.app ~/status.html

where status.html * contains

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Time zone test</title>
<div id="local"></div>
<div id="offset"></div>
    document.getElementById('local').innerHTML = "The local time is " + (new Date()).toLocaleString();
    document.getElementById('offset').innerHTML = "Local offset:" + (new Date()).getTimezoneOffset();

The date command correctly returns Mauritius time, but the javascript renders the time as being my machine's time

* apologies for posting the whole file, but there might be relevant tags I haven't considered

share|improve this question

Turns out one needs to kill all existing Chrome processes first.

export TZ='Indian/Mauritius'

killall Chrome
open /Applications/Google\ Chrome.app ~/status.html
share|improve this answer

Well the easiest method would be just to change the time on your local machine, I'm sure you know how to do this already but: OS X Mountain Lion: Date & Time preferences.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.