karishmal / google-api-dotnet-client

Automatically exported from code.google.com/p/google-api-dotnet-client
Apache License 2.0
0 stars 0 forks source link

EventsResource.ListRequest.TimeMin and EventsResource.ListRequest.UpdatedMin datatype problem #427

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
C# .NET 4.0
Windows Console Application
Calendar v3 API

Using this code :

        EventsResource.ListRequest req = service.Events.List("primary");
        req.TimeMin = DateTime.Now.AddMonths(-2);
        req.ShowDeleted = true;
        req.UpdatedMin = DateTime.Now.AddMonths(-2);
        req.SingleEvents = true;
        req.MaxResults = 5;

I get a "bad request" error.

But using this code :

        EventsResource.ListRequest req = service.Events.List("primary");
        //req.TimeMin = DateTime.Now.AddMonths(-2);
        req.ShowDeleted = true;
        //req.UpdatedMin = DateTime.Now.AddMonths(-2);
        req.SingleEvents = true;
        req.MaxResults = 5;

I get events.

I tried with :

req.TimeMin = new DateTime?(DateTime.Now.AddMonths(-2));

But I still get the same error.

What's wrong ?

Original issue reported on code.google.com by sylvain....@aznetwork.eu on 13 Dec 2013 at 11:35

GoogleCodeExporter commented 9 years ago

Original comment by pele...@google.com on 14 Dec 2013 at 5:31