views:

12

answers:

0

I've been trying to retreive the start times of Google Calendar events with the following code:

$query = $service->newEventQuery();
$query->setUser($calUser);
$query->setVisibility('private');
$query->setProjection('full');
$query->setOrderby('starttime');
$query->setSortOrder('ascending');
$query->setFutureevents('true');

try {
    $eventFeed = $service->getCalendarEventFeed($query);
} catch (Zend_Gdata_App_Exception $e) {
    echo "Error: " . $e->getMessage();
}

echo "<ul>";
$i = 0;
foreach ($eventFeed as $event) {
    $i = $i + 1;
    echo "<li>" . $event->title . " : ".$event->when[$i]->startTime."</li>";
}
echo "</ul>";

Unfortunately it only seems to bring back the date and times of recurring events. How can I return the time and dates for every event in my calendar?