Skip to content

Instantly share code, notes, and snippets.

@lightster
Last active September 7, 2018 03:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lightster/3293a5f9fe4ed23d5c183f75bc8e5d52 to your computer and use it in GitHub Desktop.
Save lightster/3293a5f9fe4ed23d5c183f75bc8e5d52 to your computer and use it in GitHub Desktop.
Re-enable Google Calendar's "Change time zone to ____?" prompt

Re-enable Google Calendar's "Change time zone to ____?" prompt

When traveling, Google Calendar will prompt to ask if you want to "Change time zone to ____?" One of the options is to "Never ask again". If you click the link to "Never ask again", there is no way within the Google Calendar UI to ever bring the link back.

In order to bring the link back, you can open Google Calendar in Chrome, type Cmd+Opt+J, paste the following code into the Console, and hit enter.

var xhr = new XMLHttpRequest;
xhr.open('POST', 'https://calendar.google.com/calendar/user_prefs');
xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded;charset=utf-8");
xhr.onreadystatechange = function() {
  if(xhr.readyState == XMLHttpRequest.DONE && xhr.status == 200) {
      console.log(xhr.response);
  }
}
xhr.send('eup=neverSuggestTz%3Afalse&hl=en&secid=' + window['INITIAL_DATA'][26]); 

You can test to see if it worked by manually changing your Google Calendar timezone to a timezone other than the timezone your computer is currently associated to,, closing Google Calendar, and then navigating back to Google Calendar.

Note: if you get a 403 error, this probably means you are logged into multiple Google accounts. Try logging into the account you want to "fix" in an incognito window and run the script via the incognito window.

Inspired by @carlothebeard, who clicked the link and then spent months wondering how to make the prompt re-appear.

@dangrous
Copy link

dangrous commented Nov 8, 2017

Hi there! I just tried this, and it doesn't seem to be working, sadly. I've done it multiple times on multiple browsers, including incognito windows (and normal) on Chrome. I don't get an error message in the console, only:

)]}'
[["u",[["neverSuggestTz","false"]]]]

but the prompt has not yet returned. Any thoughts? Let me know what other information might help.

@gfairchild
Copy link

I tried this and got the same output as @dangrous. Unfortunately, this doesn't seem to bring the prompt back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment