I can successfully update the title of the events using Google API V3, but once I include the datetime, I get internal server error. Here's the snippet of my code:
$event = $service->events->get($calendar_id,$event_id);
$event->setSummary($notes);
$service->events->update($calendar_id,$event->getId(),$event);
The above code works well since I'm only updating the title. I'm struggling with the code below:
$event = $service->events->get($calendar_id,$event_id);
$event->setSummary($notes);
$start = new Google_Service_Calendar_EventDateTime();
$start->setDateTime('2014-07-22T20:00:00+08:00');
$event->setStart($start);
$end = new Google_Service_Calendar_EventDateTime();
$end->setDateTime('2014-07-22T21:00:00+08:00');
$event->setEnd($end);
$service->events->update($calendar_id,$event->getId(),$event);
I'm not sure if I have the correct format for the datetime. Any advice? Thanks!