Yesterday, I wrote this code :
EventsResource.ListRequest req = service.Events.List("primary");
req.TimeMin = DateTime.Now.AddMonths(-2).ToString("o");
req.ShowDeleted = true;
req.UpdatedMin = LastSync.ToString("o");
req.SingleEvents = true;
req.MaxResults = 5;
TimeMin and UpdateMin were strings (string? datatype).
This morning, the code breaks.
So I updated the NuGet packages.
Now, those two fields (and any date field in the API) are typed "DateTime?"
So I updated my code to :
EventsResource.ListRequest req = service.Events.List("primary");
req.TimeMin = DateTime.Now.AddMonths(-2);
req.ShowDeleted = true;
req.UpdatedMin = LastSync;
req.SingleEvents = true;
req.MaxResults = 5;
I also tried to use "new DateTime?(DateTime.Now.AddMonths(-2))"
Now I get a "Bad Request" error as soon as TimeMin or UpdateMin is filled.
If I comment thoses lines, I get events from my calendar.
What's wrong ? Bug in the new API release ?