I have this code:
$event = new Event();
$event->setSummary( $_event['summary'] );
$event->setLocation( $_event['location'] );
$start = new EventDateTime();
$start->allDay = true;
$start->setDateTime($_event['start']);
$event->setStart($start);
$cal->events->insert( $_calendar['id'], $event );
But not works =\
Any idea?
Use $start->setDate() instead of $start->setDateTime() if you want to create a day long event.
To create a day long event
To create a event in a given duration