Closed Aly024 closed 1 year ago
Instead of using CST or GMT-6 notation, use the Google Timezone ID as documented here: https://developers.google.com/google-ads/api/data/codes-formats#timezone-ids
For the Central timezone, you would have:
var date_now = Utilities.formatDate(new Date(), "America/Chicago", "yyyy/MM/dd"); // gets the current date
var time_now = Utilities.formatDate(new Date(), "America/Chicago", "hh:mm:ss a"); // gets the current time
I was able to solve it. Both method works. I have to deploy it as a new version and then run the app script
I tried GMT+6 instead of CST but it is not working
https://github.com/StorageB/Google-Sheets-Logging/blob/7d850ee341723d698ef9fa0ded3b66a63fd62956/GoogleScripts-example.gs#L34