I have successfully established the connection and inserting and deleting events is working fine. However, when I try to update an existing event, the event text is successfully updated in my Google Calendar account, but the start_date and the end_date cannot be changed.
I have tried adding a data processor “onBeforeUpdate” event, that alters the date format to match the format expected by Goolgle APIs, but it did not help.
I honestly don’t know what might be the problem. Any help would be greatly appreciated!
Hello,
are you using a latest version of the a proxy script for google calendar google_proxy.php?
There was a similar issue that has been fixed in a while, so now everything should work correctly github.com/DHTMLX/scheduler-goo … dar/pull/1
So please confirm whether the issue happens with the latest version of scheduler-google-calendar codebase from the github
Indeed I was using the old version of google_proxy.php, however the problem persisted even with the code you suggested. I managed to get it working with the following additions:
$ev = $this->cal->events->update($this->cal_name, $ev["id"], new Google_Event($ev));
$ev = $this->cal->events->update($this->cal_name, $ev["id"], new Google_Event($data));
} catch(Exception $error){
return false;
}
// process response
if ($ev)
return $ev["id"];
return false;
}[/code]
It is updating the events successfully now.
I have another question - is there a way to detect client’s time zone automatically, because it is currently set to “Europe/Minsk” in google_proxy.php and the events are created and updated with a time offset for me. (It works ok when I manually change the time zone.)
I’m not sure there will be a generic way for detecting client’s timezone, but we’ll add a public property for setting in programmatically instead of hardcoded values
Hi,
we’ve updated the plugin github.com/DHTMLX/scheduler-google-calendar
you can set the timezone using timezone property of GoogleCalendarProxy class.
If you set it to false or null, it should take a timezone from a google calendar:
$calendar = new GoogleCalendarProxy(
...
);
$calendar->timezone = false;
$calendar->connect();