davepar / gcalendarsync

Apps Script for syncing a Google Spreadsheet with Google Calendar
MIT License
163 stars 47 forks source link

FATAL ERROR: all events are one day off (-1 day in calendar) #72

Open crysman opened 4 years ago

crysman commented 4 years ago

I am unable to solve this FATAL ERROR: all events are one day off (-1 day in calendar) even though both sheet and calendar use the same GMT offset (+2):

Google Sheet: image

image

image image

Extension settings: image

Google Calendar: image

image

BTW, I must select "Athens" in Google Sheets, because "Prague" is for some reason listed incorrectly as GMT+1. When I select "Prague" in both, however, problem doesn't get fixed anyways.

Any ideas? Thanks!

crysman commented 4 years ago

Hello, please, any info if this will be fixed? I mean: I can make all our events one day off, but that will make it unstable - when you release a fix, we will get one day off... Would be helpful if I knew realistically, what will happen in next 2 weeks, whether:

  1. I forcefully make all our events one day off (offset)
  2. Wait 2 weeks to have it fixed by developer(s) and so have it fixed by fixing the bug

Thanks a lot

davepar commented 4 years ago

Sorry for these issues. It was partly caused by Google always assuming US/Pacific time zone. This should be fixed now. Re-open the issue if it isn't.

crysman commented 4 years ago

Unfortunately, there is an error now: image image

and calendar is not synced :(

crysman commented 4 years ago

@Davepar thanks for fixing the TypeError, unfortunately the original issue persists - in Google Calendar, all events are -1 day off :disappointed:

itluzanky commented 4 years ago

To make it easier for you to debug, here are the resources:

sheet: https://docs.google.com/spreadsheets/d/1HvsaNjmquyga7ruJmEEPOLrPhbY8b4vRRFu99OdSxgw/edit#gid=901722093

calendar: c_0vtp5ksq7553alumb371avgkqk@group.calendar.google.com

please let us know soon what is going on here... thanks a lot!

davepar commented 4 years ago

I can't seem to re-create this problem on my computer. I'm in the US/Pacific time zone (-7) and have no issues. I've set everything I can think of to New Zealand time (+12) which is a day ahead of me, and still have no issues syncing either way. I've found 4 different places to set time zone, in the sheet, in the specific calendar, in Calendar general settings, and on my computer.

I was able to make everything off by a day (including non-all day events) by setting both Calendar time zones to something different than my computer time zone. You have all 4 places I mentioned above set to the same time zone, right?

davepar commented 4 years ago

Or this is interesting, the dates seem to actually start going off by one day when I set the "secondary time zone" in Calendar settings. When I unchecked "secondary time zone", still off by one day. It wasn't until I actually changed the secondary time zone to the same as my primary time zone that it was fixed. That seems like a bug in Calendar.

davepar commented 4 years ago

I might have figured out the problem. I just uploaded a new version that uses the spreadsheet's time zone for all-day events. Hopefully that works for you.

itluzanky commented 4 years ago

@Davepar thanks a lot - at last, this has fixed the problem ... well, almost :( - see #77

by the way... how do you feel about me posting so many issues - aren't you tired? I can imagine you've got other things to do than maintaining some side project - I want to add sincere thank you for providing us an open source piece of software and maintaining it - I do not take is as granted. Thanks!

itluzanky commented 4 years ago

might be closed now I think https://github.com/Davepar/gcalendarsync/issues/76#issuecomment-695979460