2

I've been having a very hard time trying to properly set up the timezones of calendar event dates because the Javascript's Date object is taking the project's timezone:

Project properties.

Is there a way to programmatically change that property?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Iván Herazo
  • 133
  • 1
  • 2
  • 13
  • 2
    Possible duplicate of [Programatically change a Google apps script's timezone](https://stackoverflow.com/questions/44336869/programatically-change-a-google-apps-scripts-timezone) – galoget Dec 13 '18 at 19:31

1 Answers1

1

Yes it is possible using date time formatting. Here is an example

Utilities.formatDate(new Date(data[0][12]), "GMT+5", "EEEE, dd MMM yyyy")

You can mention your time zone instead of "GMT+5".