title: How to get Google Calendar event startime using Zend_Gdata?
body: <p>Currently I'm working on project where I need to access Google Calenadar data using API - everything works fine but I'm unable to get event start time/end time - most important informations.</p>
  
  <p>I'm using Zend framework and Zend_Gdata library , unfortunately zend's documentation isn't detailed</p>
  
  <p>How to get needed event data? Or maybe should I use another library?</p>
  
  <p>Here is my function for getting event feed:</p>
  
  <pre><code>public function getEvents($future_only = TRUE,$force_refresh = FALSE) {
  
      if (($this-&gt;events != NULL) &amp;&amp; $force_refresh == FALSE) {
          return $this-&gt;events;
      } else {
          if ($this-&gt;getService() != NULL) {
              $service = $this-&gt;getService();
              try {
  
                  $query = $service-&gt;newEventQuery($this-&gt;url);
                  $query-&gt;setUser(null);
                  $query-&gt;setProjection(null);
                  $query-&gt;setVisibility(null);
                  $query-&gt;setOrderby('starttime');
                  if ($future_only) {
                      $query-&gt;setFutureevents('true');
                  } else {
                      $query-&gt;setFutureevents('false');
                  }
  
                  $event_feed = $service-&gt;getCalendarEventFeed($query);
  
                  $this-&gt;events = $event_feed;
  
                  return $event_feed;
              } catch (Exception $exc) {
                  .
                  .
                  .
                  return NULL;
              }
          } else {
              return NULL;
                 }
             }
          }
  </code></pre>
  
  <p>And sample test code where I'm trying to obtain event informations:</p>
  
  <pre><code>       $gcalendar = new  Common_Model_GoogleCalendar();
  
               $events = $gcalendar-&gt;getEvents();
  
              if($events){
  
              foreach ($events as $evt) {
                  echo $evt-&gt;title.'&lt;br /&gt;';
                  echo $evt-&gt;id.'&lt;br /&gt;';
                  echo $evt-&gt;published.'&lt;br /&gt;';
                  Zend_Debug::dump($evt-&gt;getWhen());       //returns empty array
  
              }
              }
  </code></pre>