I am using an event receiver to ItemUpdated function to keep two calendars in sync. My code words fine but I notice that when "All Day Event" is exported it gives the new list a different end date.
EX:
Original List
Title: Test1
End Date: 1/28/2016 11:59pm
All Day Event: Yes
New List
Title: Test1
End Date: 1/29/2016 11:59pm
All Day Event: Yes
How can I stop this from updating the EndDate to the next day?
UpdateItem["Title"] = properties.ListItem["Title"];
UpdateItem["EventDate"] = properties.ListItem["EventDate"];
UpdateItem["EndDate"] = properties.ListItem["EndDate"];
UpdateItem["fAllDayEvent"] = properties.ListItem["fAllDayEvent"];
properties.ListItem.Update();
UpdateItem.Update();
context.ExecuteQuery();