Home > Software engineering >  Appscript giving Different date than Given in Google Sheet
Appscript giving Different date than Given in Google Sheet

Time:03-19

Iam pretty new to Appscript and iam trying to integrate sheets with calendar with Appscript.I have a couple of dates in my Sheet which is formatted as text date like 11 March 2022.The probelm is when i try to console.log this date in Appscript it shows Thu Mar 10 2022 13:30:00 GMT-0500 (Eastern Standard Time) which is Differnet from my timezone which is IST (GMT 5:30). And when i try to Add this to calendar event it still adds the event in the same timezone and not mine.How to fix it?

Thanks In Advance!

CodePudding user response:

You have to check and correct the timezone in the script editor.

To do that, go to settings in your script editor (select the gear on the left hand side) and active the third checkbox. Return to the script editor and edit appsscript.json. Change as needed the time zone (Asia/Colombo or Asia/Calcutta)

enter image description here

  • Related