After some further hacking, I believe the problem is in the method:
When.Save(XmlWriter writer)
The logic will only write a UTC-type date string into the Xml string,
whereas dates need to be in the format yyyy-MM-dd for the event to be
interpreted as 'All-day'. I made the following mods to
When.Save(XmlWriter writer):
//string date = Utilities.LocalDateTimeInUTC(startTime);
string date = startTime.ToString("yyyy-MM-dd");
and
//string date = Utilities.LocalDateTimeInUTC(endTime);
string date = endTime.ToString("yyyy-MM-dd");
and then used the following code to define my event:
EventEntry appt = new EventEntry();
appt.Title.Text = "Test";
appt.Content.Content = "test";
When when = new When();
when.StartTime = new DateTime(2006, 5, 9);
when.EndTime = new DateTime(2006, 5, 10);
appt.Times.Add(when);
service.Insert(query.Uri, appt);
Result was a one-day event properly marked as 'All-Day'
Whoo-Hoo!!
--~--~---------~--~----~------------~-------~--~----~
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://groups.google.com/group/google-calendar-help-dataapi
-~----------~----~----~----~------~----~------~--~---