When fetching a list of appointments from GroupWise some of the dates in the retrieved appointment objects do not match the values in GroupWise, in fact they are more than 50 years in the future. For instance in the following method I look for appointments starting on or after 1st Jan 2000 midnight and ending on or before 31st December 2010 23:59:59:-
public List<Appointment2> GetGroupWiseAppointments()
{
Application2Class gwApp = new Application2Class();
Account gwAccount = gwApp.Login(Type.Missing, Type.Missing, LoginConstants.egwPromptIfNeeded, Type.Missing, Type.Missing);
Folder gwCalendar = gwAccount.Calendar;
List<Appointment2> appointments = new List<Appointment2>();
MessageList gwAppointments = gwCalendar.Messages.Find("( APPOINTMENT AND BOX_TYPE = INCOMING AND START_DATE >= 2000/1/1 AT 0:0:0 AND DUEEND_DATE <= 2010/12/31 AT 23:59:59 )");
foreach(Appointment2 gwAppointment in gwAppointments)
{
appointments.Add(gwAppointment);
}
}
In my test data all of the appointments are dated within 2 weeks of today but the returned objects are 58 years 3 months 1 day 13 hours and 16 minutes in the future. What is more strange is that this doesn't happen every time you retrieve them!
Has anyone experienced this before and have they found a solution to it?