title: Google Calendar API querying all-day events
body: <p>I have an app that uses the Calendar v3 API to create, query, and modify all-day events on Google Calendar.  These events look something like this when I create them:</p>
  
  <pre><code>{ 
    summary: 'My Event",
    start: { date: '2014-07-26' },
    end: { date: '2014-07-26' } 
  }
  </code></pre>
  
  <p>So if I want to query all of such events between July 20th and July 26th, I send a query like this:</p>
  
  <pre><code>GET www.googleapis.com/calendar/v3/{calendarID}/events?timeMin=2014-07-20T00%3A00%3A00.000Z&amp;timeMax=2014-07-26T00%3A00%3A00.000Z
  </code></pre>
  
  <p>In a more readable format, the parameters are:</p>
  
  <pre><code>timeMin:2014-07-20T00:00:00.000Z
  timeMax:2014-07-26T00:00:00.000Z
  </code></pre>
  
  <p>However, this excludes all of the events with the date <code>2014-07-26</code>, it gets only the events for the 20th to the 25th.  In my parameters you can see that I have used <code>setUTCHours(0)</code> in order to have no time zone information.</p>
  
  <p>If I remove the calls to <code>setUTCHours(0)</code> for the <code>timeMin</code> and <code>timeMax</code> parameters then I have the opposite problem, I get 7/21 through 7/26 and miss the events on 7/20.  How can I reliably get all of the all-day events for the week in any time zone?</p>