Page Summary
-
Google Ads scripts often require working with dates and times for tasks like reporting, scheduling, and logging.
-
JavaScript's built-in
Dateobject represents a specific moment in time independent of any time zone. -
Avoid using JavaScript
Dateobject methods that assume a default time zone in Google Ads scripts, as the default is always America/Los_Angeles regardless of your account's time zone. -
Use
Utilities.formatDate()to format date objects for specific time zones and formats, and