title: why Google Calendar all day events return start date as today with php
body: <p>I am using Google calendar api V3 with PHP and am trying to get event's summary, description and start date.  My issue is with the last element: Start date.  When events in the calendar are set as "All day" events, the response from the following code gives me today's date and the exact time when the query was made:</p>
  
  <pre><code>echo "&lt;div id=Activite class=titre&gt;", $event-&gt;getSummary(), "&lt;/div&gt;\n";
  
  $event_date = (new DateTime($event-&gt;getStart()-&gt;getDateTime()))-&gt;format('d/m/Y H:i');
  echo "&lt;div class=date_start&gt;&lt;span style=color:yellow;&gt;Start: &lt;/span&gt;", $event_date, "&lt;/div&gt;\n";
  </code></pre>
  
  <p>Here is an example of what is returned:</p>
  
  <pre><code>prise de photos des élèves
  Start: 22/11/2014 18:30
  </code></pre>
  
  <p>Reading the same output from the "Google APIs Explorer", I get:</p>
  
  <pre><code>start": {
  "date": "2013-09-13"
  </code></pre>
  
  <p>Which is nothing like what I am getting in my case.  What am I doing wrong?</p>