Free/busy feed returning all-day events in UTC without shift from calendar time zone.

349 views
Skip to first unread message

Jared

unread,
Jan 27, 2012, 10:01:56 PM1/27/12
to google-ca...@googlegroups.com
Here is an example. I have created two events on a calendar in PST.

1) All-day event
2) Regular event from 12p-2p

Here is the result from the API.  The regular event was shifted correctly, but the all-day one was not.  Am I missing something?

{
"kind": "calendar#freeBusy",
"timeMin": "2012-01-26T15:00:00.000Z",
"timeMax": "2012-01-31T15:00:00.000Z",
"calendars": {
"*removed*": {
"busy": [
{
"start": "2012-01-28T00:00:00Z",
"end": "2012-01-29T00:00:00Z"
},
{
"start": "2012-01-28T20:00:00Z",
"end": "2012-01-28T22:00:00Z"
}
]
}
}
}

Jared

unread,
Feb 1, 2012, 1:30:39 PM2/1/12
to google-ca...@googlegroups.com
No help on this issue?

I tried setting the response timeZone to something other than UTC, and it shifts the all-day event to make sure it's still aligned with a UTC full day.... this definitely seems like a bug.

Jared

unread,
Feb 9, 2012, 6:23:57 PM2/9/12
to google-ca...@googlegroups.com
bump

Ray Baxter

unread,
Feb 9, 2012, 6:39:41 PM2/9/12
to google-ca...@googlegroups.com
Under older versions of the api, all day events did not have a time, so have you tried creating events

{
"start": "2012-01-28",
"end": "2012-01-29"
},

Ray

On Thu, Feb 9, 2012 at 3:23 PM, Jared <jared...@gmail.com> wrote:
bump

--
You received this message because you are subscribed to the Google Groups "Google Calendar API" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-calendar-api/-/onZLUTzs7woJ.

To post to this group, send email to google-ca...@googlegroups.com.
To unsubscribe from this group, send email to google-calendar...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-calendar-api?hl=en.

Jordan Berg

unread,
Apr 21, 2012, 2:37:54 PM4/21/12
to google-ca...@googlegroups.com
I am also experiencing this issue, even in the API explorer with events on public calendars.  For example the US holidays:

POST https://www.googleapis.com/calendar/v3/freeBusy?pp=1&key={YOUR_API_KEY}

Content-Type:  application/json
Authorization:  OAuth *removed*
X-JavaScript-User-Agent:  Google APIs Explorer
{
"timeMin": "2012-04-20T10:00:00.000-04:00",
"timeMax": "2012-04-30T10:00:00.000-04:00",
"items": [
],
"timeZone": "America/New_York"
}


that returns:


{
"kind": "calendar#freeBusy",
"timeMin": "2012-04-20T14:00:00.000Z",
"timeMax": "2012-04-30T14:00:00.000Z",
"calendars": {
"busy": [
{
"start": "2012-04-21T20:00:00-04:00",
"end": "2012-04-22T20:00:00-04:00"
}
]
}
}
}

It does seem like the all day events are being forced to UTC.

Any advice on how to resolve this issue?

Thanks!

Jordan

char mata

unread,
Apr 23, 2012, 6:25:49 PM4/23/12
to google-ca...@googlegroups.com
I don't mean to hijack this thread but I myself am on the other side of the issue...my free busy query completely ignores 'all day' events.

I re-created your scenario and tried to query both here: https://developers.google.com/google-apps/calendar/v3/reference/freebusy/query
and in my application, in both cases the 'all day' event did not show up in the results.
It did however when I used https://developers.google.com/google-apps/calendar/v3/reference/events/list
but it returned without the time-information:

"start": "2012-01-28",
"end": "2012-01-29"

I suspect your results are related to what time-zone your calendar is set to and what format you are passing in for timeMin and timeMax..
When you are creating such an event, do you check off the 'All Day Event' checkbox?


Ray Baxter

unread,
Apr 23, 2012, 10:13:40 PM4/23/12
to google-ca...@googlegroups.com
By default in the calendar ui, creating an all date event, shows you as "available." Unchecking the "All day" box, changes the "Show as" radio button to "Busy."

 For the "forced to UTC" issue. All-day events have no time, or alternatively they run from midnight to midnight where ever you are, so the time does not matter. 

Ray

--
You received this message because you are subscribed to the Google Groups "Google Calendar API" group.

Jordan Berg

unread,
Apr 24, 2012, 2:02:25 PM4/24/12
to google-ca...@googlegroups.com
Well, the time is mattering for me. I am not fetching the events
themselves, only the freebusy times. The freebusy times seem to be
ignoring the requested return timezone and instead returning the all
day event based on UTC. I suppose that I can either detect 24 hour
events that are shifted to UTC, or maybe ask for the whole freebusy
request in UTC and do the timezone conversions myself, but these seem
kind of hackish.

I guess I am hoping if someone can point out something I am doing
wrong or point me in the right direction to report a bug (if this is
one) if this isn't the right place.

Cheers,

Jordan

char mata

unread,
Apr 24, 2012, 5:49:25 PM4/24/12
to google-ca...@googlegroups.com
I think this a bug and would like to see it fixed as well.

As an alternative it is possible to make an events.list request and use the 'fields' for a partial request to only return start/end times.

Rami Chamaa

unread,
Jan 16, 2015, 6:01:38 AM1/16/15
to google-ca...@googlegroups.com
Any updates on this?

Rami Chamaa

unread,
Mar 19, 2015, 12:50:23 PM3/19/15
to google-ca...@googlegroups.com
Please any update on this. Any thoughts? 
Reply all
Reply to author
Forward
0 new messages