Hello,
I am creating calendar events using the Calendar API v3 (.NET). I can use the events QuickAdd method but receive an errror when using the events Insert method (see below). I am not seeing much on the time max parameter.. Here is my code (from the sample). I have played with the dates and timezones but have not been successful. Thanks.
ERROR:
Google.Apis.Requests.RequestError
The specified time range is empty. [400]
Errors [
Message[The specified time range is empty.] Location[timeMax - parameter] Reason[timeRangeEmpty] Domain[calendar]
CODE:
Event aEvent = new Event()
{
Description = "Test API",
Summary = "Appointment",
Location = "Nowhere",
Start = new EventDateTime()
{
DateTime = "2012-04-03T10:00:00.000"
},
End = new EventDateTime()
{
DateTime = "2011-04-03T11:00:00.000"
},
};
try
{
Event createdEvent = service.Events.Insert(aEvent, "primary").Fetch();
Console.WriteLine(createdEvent.Id);
}
catch (Exception e)
{
string x = e.Message;
}