class Session method .getScriptTimeZone()

Session is the Apps Script service.

.getScriptTimeZone() is the method name you will see after a dot in your code.

What it does

Returns the time zone set on the script project.

Why it's used

  • Format dates the way the project expects.
  • Schedule reports in the script's time zone, not yours.

Common errors

  • Forgetting parentheses on getScriptTimeZone. Write Session.getScriptTimeZone(), not Session.getScriptTimeZone or getScriptTimeZone by itself.
  • Skipping dots between chained calls. Each step needs a dot, like Session.getScriptTimeZone().
  • Adding spaces where they do not belong. Write Session.getScriptTimeZone(), not Session .getScriptTimeZone(), Session.getScriptTimeZone (), or Session . getScriptTimeZone().
  • Wrong capitalization. Use Session and getScriptTimeZone, not session or getscripttimezone.

Explore

Related methods

Better Sheets tutorials

No tagged tutorials yet. Fetch Apps Script from the harvest table and this page fills automatically.

Related blog posts

Written guides about Session.getScriptTimeZone().

Browse the blog