0

I am putting the time zone in as GMT, which matches my calendar settings. However, when the dates and times export into Google Sheets it is coming up an hour prior to the times that are listed on the calendar. Please help to determine what is going wrong.

This is my code I am pulling from my calendar of events:

var events = cal.getEvents(new Date("October 2, 2018 00:00:00 GMT"), new Date("October 8, 2018 23:59:59 GMT"), {search: '-project123'});

The time in the calendar states 9:25 GMT but when it shows up in Google Sheets it is showing as 8:25

tehhowch
  • 9,645
  • 4
  • 24
  • 42
  • 825 GMT, or 825 GMT-1? – tehhowch Sep 27 '18 at 17:53
  • Possible duplicate of [different time in google calendar when adding events from spreadsheet](https://stackoverflow.com/questions/25698056/different-time-in-google-calendar-when-adding-events-from-spreadsheet) – tehhowch Sep 27 '18 at 18:04
  • Possible duplicate of [Reading & writing dates from Google Spreadsheets](https://stackoverflow.com/q/51525738/9337071) – tehhowch Sep 27 '18 at 18:56
  • Your Sheet, Apps Script file, and Calendar all have individual time zone settings. If all three are in your account, and you haven't changed the time zone settings, then they should all be the same time zone. But there can be situations where the code file, and the documents have different times zones, like people in the same company that work in different countries. There's also the issue of Daylight Saving Time. Sometimes the current date, and the date being set is at different times of year, one being in DST and one not. – Alan Wells Sep 27 '18 at 19:39
  • Set the desired timezone in Spreadsheet Settings and Project Properties respectively. – simesy Sep 11 '19 at 00:13

0 Answers0