Hello,

You can specify the
"ctz<http://code.google.com/apis/calendar/data/2.0/reference.html#Parameters>"
query parameter if you want to retrieve your events in a specific timezone.
Also, the event's start and end times are in ISO 8601 format and you can use
open-sourced ISO 8601 datetime parsers to do the job such as:
  http://code.google.com/p/pyiso8601/

This will return a dateime.datetime object.

Best,
Alain

On Wed, Jun 15, 2011 at 4:25 AM, Cu7l4ss <[email protected]> wrote:

> Hi
>
> I'm having a bit of trouble getting all the events that overlap at a
> certain time.
> It seems as though I can't manage to query for events that overlap a
> certain time, since the end date(start_max) is exclusive.
>
> Anyways I've taken a different approach(any suggestions will be welcomed):
> Take the event feed for the entire day and iterate over it checking that
> all the events does not overlap the wanted time span.
> Problem is that in python I can't seem to manage to find the correct time
> format if I have the timeZone turned on in the calendar.
> Here is my code to check the feed:
>
>     client = gdata.calendar.service.CalendarService()
>     client.ClientLogin(email, password, "never got the hang of the source
> var")
>     query = gdata.calendar.service.CalendarEventQuery("****@
> group.calendar.google.com", 'private', 'full')
>     query.start_min = start_date
>     feed = client.CalendarQuery(query)
>     for i, an_event in enumerate(feed.entry):
>         for z, a_when in enumerate(an_event.when):
>             resp.out.write(pprint(a_when))
>             start1 = time.strptime(a_when.start_time,
> '%Y-%m-%dT%H:%M:%S.000%Z')
>             end1 = time.strptime(a_when.end_time,
> '%Y-%m-%dT%H:%M:%S.000%Z')
>             condA = start1 > end_time
>             condB = start_time > end1
>             if not condA and not condB:
>                 return True
>             else:
>                 return False
>
> The calendar will return the time of the event with +timezone(f.e. +02:00)
> which is good but I cannot convert it to a time object.
>
> What can I do?
>
> Thanks !
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Google Calendar Data API" group.
> To post to this group, send email to
> [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://code.google.com/apis/calendar/community/forum.html
>



-- 
Alain Vongsouvanh

-- 
You received this message because you are subscribed to the Google
Groups "Google Calendar Data API" group.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://code.google.com/apis/calendar/community/forum.html

Reply via email to