-
-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If Script's timezone is different than calendar, all day events are created on the wrong day #34
Comments
Additionally (though probably unrelated), it seems that if the script is to create the calendar, it's set to GMT, making the events appear shifted. This may be fixed by using CalendarApp.setTimeZone on creation, not entirely sure. Changing the timezone after the events are created seems to have no impact. Edit: Damn it. It worked for 5 minutes then reverted to having everything shifted… Investigating. |
Easiest fix should be editing the toJSDate function in ical.js to return a Date instead of DateTime for AllDay-Events.
|
seeing incorrect timezone on an hour long meeting as well. script runs in same timezone as my calendar. although owner of the original event may be in another timezone, so it's possibly not converting the ical timezone to my timezone properly.... DTSTART;TZID=Central Standard Time:20190711T130000 my script and calendar are in arizona/phoenix timezone, not central standard. it syncs as 1-2pm on my calendar, but it should be 11am-12pm |
I'm encountering a similar problem for events as @amytencza. Events that have been created in a different time zone end up at the wrong location in my calendar. Event is created in India and should apprear at 11:00 but it appears at 14:30. When I check the logs I see the following: |
Fixed with #51 . Will release a new version soon |
I believe the title of this bug report is still not fixed, at least. If I don't set the script's timezone to the ICS's, then events are placed at the wrong time. |
Ok, I'll reopen this so we make sure to check it |
Do you have a setup where the event in post 1 is created on the wrong day? Can't reproduce the issue with the latest commit. |
The initial comment on this issue should have a setup that shows the issue |
Sure thing. I had the script on BST and this ical:
The log then says that the event is at 11 BST, instead of central time. This is still true if:
|
I don't think that the ics you provided is valid.
After fixing these, it actually worked fine:
|
@jonas0b1011001 I think some services (maybe Outlook & Google Calendar) might have those values hardcoded for IANA timezones like |
That might be the case, nevertheless it's not valid and i'm not sure how we would be able to compensate the missing information.
|
I did mention that a fully fledged VTIMEZONE does not solve the problem, but I wasn't aware of the notion of floating time. As per the iCalendar specification:
I was wrongly expecting that the VTIMEZONE would apply. It can however be argued that the right behavior is to use the target calendar timezone rather than the script's; I would expect users to understand the concept of calendar timezone better than script timezone. Depending on how you feel about that, please close this issue or leave it open. For information, this ics was produced by org-mode, which certainly approximates the standard. Sorry for the noise and thanks for the support. |
Totally agree, will try to adjust it :) |
Same here: content snapped for Privacy The event is created at 23:00 while it should be created at 14:00. |
Please manually replace your code.gs with the latest version on this repo and try again. The example you posted syncs fine on my end. |
@jonas0b1011001 That was it. I had an older version. :) It works as expected. |
I've pulled in @jonas0b1011001 's PR and any other comments seem to be solved. So I'm going to go ahead and close this issue |
Setup:
Calendar timezone: Central time - Chicago
Script timezone: Pacific Time
Test string (wiki):
Note how event in ics is set for April 7th, but is created on April 6th. If the Script timezone is changed to match the calendar (eg Central Time) then the issue disappears. We should make this rely on the calendar or ics timezone - not the Script timezone
The text was updated successfully, but these errors were encountered: