Open garybentley opened 9 years ago
Hi @garybentley
You should try to create a payload like the following:
{
"Attendees":[
{
"EmailAddress":{
"Address":"foo@bar.com",
"@odata.type":"#Microsoft.OutlookServices.EmailAddress"
},
"@odata.type":"#Microsoft.OutlookServices.Attendee"
}
],
"Body":{
"Content":"This is the appointment info",
"ContentType":"Text",
"@odata.type":"#Microsoft.OutlookServices.ItemBody"
},
"End":"2015-09-09T00:00:00.000Z",
"Importance":"High",
"IsAllDay":true,
"Start":"2015-09-08T00:00:00.000Z",
"Subject":"Today's appointment",
"@odata.type":"#Microsoft.OutlookServices.Event"
}
Please check the Start and End properties. Both must be set with at midnight but at different dates ( + 1) Sadly the date handling in Java is less than ideal, but this creates a successful POST request.
Thanks
I added a sample written in Android, but applies to this case:
Sorry but this doesn't address the issue, using your exact code from the Android example I get the same result. In the Office 365 calendar the event shows up as spanning 2 days, in the events list for the day it says that it's duration is "1 day" but it will show that for both days, say if I click on the 8th then the 9th Sept.
Is this an issue with the Office 365 calendar interface instead?
@garybentley yes. Now I understand. Sadly I'm facing the same issue. I found this : http://stackoverflow.com/questions/28982218/all-day-events-is-not-created-correctly-in-office-365 . Please try it. Anyway I'm contacting the API owner for further information.
If an event is allday for a day, then it will be the same date and time, right? Then should I add a day manually to the end date? And after creating an event like that, then should I subtract a day to get the event? What is the correct all day event?
It seems impossible to create a single day (24 hour) all day event.
If I try and set the start/end dates to be the same then I get error:
"The duration of an event marked as All day must be at least 24 hours."
If I set the end date to be start date + 1 day then the date spans 2 days in the Office 365 calendar.
If I try and set the end date to be start date - 1 second then I get an error saying that all day events must have their times set to midnight.
I've set the timezone to "Greenwich Standard Time" for the start and end time zone.
Is there something I'm missing or is it just not possible?