If you have made it to this post you are probably a little frustrated about why your Google Apps Script time triggers are not running on or around the times that you have designated. Of course, you could simply just be a well-oiled machine and want to know how to update the time zone of your project for your client.
To cut to the chase, the likely cause of clock triggers not running in the time range that you have selected is that the time zone in your Google Apps Script project is out.
How to check your Project’s Timezone
So, how do you check the time zone of your project?
If you need to do it programmatically you can use the Session class and the getScirptTimezone()
method. Something like this will log your project’s timezone:
1 |
console.log(Session.getScriptTimeZone()) |
Alternatively, you can check out your project manifest file.
To do this in your Google Apps Script IDE, go to your sidebar and select theΒ Project settings cog and then check the Show “appsscript.json” manifest file in editorΒ checkbox under the general settings.

Go back to the editor and your “appscript.json” file will be visible. Select it and you will be able to see the current time zone for your project.

Changing the timezone
So, at the time of writing this, I found the information on the correct syntax for the time zone in the manifest in the docs either too simplified or when clicking the associated link, too convoluted for my poor goat brain to handle.
In short, you can add certain countries followed by their city. Like this:
“Australia/Sydney”
Or in your code, like this:
1 2 3 4 5 6 7 |
{ "timeZone": "Australia/Sydney", "dependencies": { }, "exceptionLogging": "STACKDRIVER", "runtimeVersion": "V8" } |
Alternatively, you can use GMT time in this format:
“Etc/GMT-10” << For Sydney, Australia
The -10 can be changed to whatever GMT you need.
Resources
After a bit of testing and some searching, I came across these two resources to help you when entering in the correct time zone.
- http://joda-time.sourceforge.net/timezones.html <<Note! It is not HTTPS secure.
- http://tutorials.jenkov.com/java-date-time/java-util-timezone.html
Alternatively, I have created a Google Sheet that contains:
- A full timezone list with aliases
- A full timezone list without aliases
- A GMT only list
These might be useful for bookmarking or exporting certain Google Sheet tabs as CSVs.
Just go toΒ File > Make a copyΒ so you have your very own version of the document.
Finally, here is a list of all the GMT values:
Standard Offset | GMT |
---|---|
-12:00:00 | Etc/GMT+12 |
-11:00:00 | Etc/GMT+11 |
-10:00:00 | Etc/GMT+10 |
-09:00:00 | Etc/GMT+9 |
-08:00:00 | Etc/GMT+8 |
-07:00:00 | Etc/GMT+7 |
-06:00:00 | Etc/GMT+6 |
-05:00:00 | Etc/GMT+5 |
-04:00:00 | Etc/GMT+4 |
-03:00:00 | Etc/GMT+3 |
-02:00:00 | Etc/GMT+2 |
-01:00:00 | Etc/GMT+1 |
+00:00:00 | Etc/GMT-0 |
+01:00:00 | Etc/GMT-1 |
+02:00:00 | Etc/GMT-2 |
+03:00:00 | Etc/GMT-3 |
+04:00:00 | Etc/GMT-4 |
+05:00:00 | Etc/GMT-5 |
+06:00:00 | Etc/GMT-6 |
+07:00:00 | Etc/GMT-7 |
+08:00:00 | Etc/GMT-8 |
+09:00:00 | Etc/GMT-9 |
+10:00:00 | Etc/GMT-10 |
+11:00:00 | Etc/GMT-11 |
+12:00:00 | Etc/GMT-12 |
+13:00:00 | Etc/GMT-13 |
+14:00:00 | Etc/GMT-14 |
And a link to the GMT converter:
I hope this saves you a little time.
Looking to learn more about Google Apps Scripts in a more structured format? Udemy has some great courses that can get you from the basics to a real Google Apps Script pro.
Got a more specific problem you need help with, but donβt have the time to develop the skills? Make an enquiry on my 'Hire me!' page. I occasionally pick up projects. Alternatively, Fiverrβs your best bet to find a skilled Google Apps Script developer to solve your problem quickly and professionally. *
*The above affiliate links have been carefully researched to get you to what you specifically need. If you decide to click on one of these links it will cost you just the same as going to the site. If you decide to sign up, I just get a little pocket money to help pay for the costs of running this website.
~Yagi
Thank you!!! I spent 8 hours getting crazy before finding your tip on how to change the timezone in Google Apps scripts. You saved my day π
You are very welcome!