Ray,

I just tried setting the time zone:
myQuery.TimeZone = "America/New_York";
This didn't change anything. Everything should be set to the same time
zone by default. I created the calendar, events, google account, etc
in the same time zone I'm running the queries from.

I also added an ordering just to inspect it further and the first
event in the order is the all-day event on the 5th followed by the
regular event on the 4th and then the all-day event on the 4th.
myQuery.ExtraParameters = "orderby=starttime";

The times of the events being returned match the error. (eg. Times for
events I set on the 5th are returned as events that begin on the 5th.)

Thanks for the suggestion,
Chris


On Jul 5, 1:02 am, Ray Baxter <[email protected]> wrote:
> This is a time zone issue of some sort. Try looking at the times with zone
> of you events, particularly the all day events. Your start and end times
> should like like this for all day events.
>
>     <gd:when endTime='2011-07-06' startTime='2011-07-05' />
>
> I'm betting that they include times and that those times are not in the same
> time zone as you are querying for.
>
> Ray
>
>
>
>
>
>
>
> On Mon, Jul 4, 2011 at 9:41 AM, Chris <[email protected]> wrote:
> > Hmm...Interesting that you used the direct url. I tried doing this and
> > now I have encountered the opposite problem.
>
> > Query 1:
> >            String feedUrl = "http://www.google.com/calendar/feeds/
> > default/private/full?start-min=2011-07-04T00:00:00&start-
> > max=2011-07-04T23:59:59";
> >             EventQuery myQuery = new EventQuery(feedUrl);
> >             // Notice that no fields of the EventQuery are set here
>
> > This query returns all-day events for today plus some events from
> > yesterday.
>
> > Query 2:
> >            String feedUrl = "http://www.google.com/calendar/feeds/
> > default/private/full";
> >             EventQuery myQuery = new EventQuery(feedUrl);
> >            myQuery.StartTime = new DateTime(DateTime.Today.Year,
> > DateTime.Today.Month, DateTime.Today.Day, 0, 0, 0);
> >            myQuery.EndTime = new DateTime(DateTime.Today.Year,
> > DateTime.Today.Month, DateTime.Today.Day, 23, 59, 59);
> >             // Notice that the URL has changed here
>
> > This query returns all events for today plus all-day events for
> > tomorrow.
>
> > I don't know. Maybe this works in your sandbox but it's not working in
> > my dev environment. (It is Visual Studio 2010 express C# on a Windows
> > 7 platform.)
> > Is there anyone who has tried this in the real world with C#?
>
> > I just spent all weekend writing a DLL with an objective C++ wrapper
> > to get my NON-objective code ported to C# (what a pain) so I could use
> > this library. It's just really disappointing that simple queries like
> > this are so hard to implement.
>
> > Here is the rest of my code:
> > // Perform Query
> >            EventFeed resultFeed = null;
> >            try
> >            {
> >                resultFeed = service.Query(myQuery);
> >            }
> >            catch (Exception)
> >            {
> >                MessageBox.Show("Caught query exception.");
> >            }
>
> >            if (resultFeed != null)
> >            {
> >                // List the items that the query retreived
> >                for (int i = 0; i < resultFeed.Entries.Count; i++)
> >                {
> >                    EventEntry entry =
> > (EventEntry)resultFeed.Entries[i];
> >                    if (!entry.IsDraft &&
> >                            entry.Status.Value ==
> > Google.GData.Calendar.EventEntry.EventStatus.CONFIRMED.Value)
> >                    {
> >                              // Do processing here
> >                     }
> >                }
> >            }
>
> > On Jul 4, 11:27 am, Johan Euphrosine <[email protected]> wrote:
> > > Hi Chris,
>
> > > After trying to reproduce your error onhttp://
> > googlecodesamples.com/oauth_playground/index.phpit seems that
> > > it works as intended:
>
> > > GEThttps://
> >www.google.com/calendar/feeds/default/private/full?start-min=...
>
> > > Only returns the events for the 2011-07-05 and not for 2011-07-06.
>
> > > Hope that helps.
>
> > > On Sun, Jul 3, 2011 at 10:51 PM, Chris Reilly <[email protected]>
> > wrote:
> > > > That works fine for regular events but it is still grabbing all-day
> > events
> > > > for the next day.
>
> > > > On Sun, Jul 3, 2011 at 4:48 PM, Dimitrios Zlitids <[email protected]
>
> > > > wrote:
>
> > > >> Στις 03/07/2011 21:35, ο/η Chris έγραψε:
>
> > > >>> I am using GData .NET library and I'm trying to get ALL events for
> > ONE
> > > >>> day. That means all-day events, one-time events, repeating events,
> > > >>> etc. I don't care what kind of event it is.. As long as it occurs on
> > > >>> one particular day, I want to download it.
>
> > > >>> This is my query:
> > > >>>             EventQuery myQuery = new EventQuery(feedUrl);
> > > >>>             myQuery.StartTime = new DateTime(DateTime.Today.Year,
> > > >>> DateTime.Today.Month, DateTime.Today.Day, 0, 0, 0);
> > > >>>             myQuery.EndTime = new DateTime(DateTime.Today.Year,
> > > >>> DateTime.Today.Month, DateTime.Today.Day,23,59,59);
> > > >>>             myQuery.SingleEvents = true;
>
> > > >>> Now I assumed that this meant get all events between midnight and
> > > >>> 11:59:59 pm.
> > > >>> Unfortunately, It's picking up all-day events for the next day. I've
> > > >>> tried every combination I can think of and searched everywhere but no
> > > >>> solution.
>
> > > >>> What could I be missing???
>
> > > >> I'm doing it like:
>
> > > >> myQuery.StartTime = DateTime.Today;
> > > >> myQuery.EndTime = DateTime.Today.AddDays(1);
>
> > > >> and it's working. Try it and tell me.
>
> > > >> --
> > > >> 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
>
> > > > --
> > > > 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
>
> > > --
> > > Johan Euphrosine (proppy)
> > > Developer Programs Engineer
> > > Google Developer Relations
>
> > --
> > 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

-- 
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