Exchange/Outlook integration, Time Zones and conversions
Generic code to create all tasks at 0000 at the app server time zone Wherever the app is installed, it will use that Time Zone – IST, EST etc private static void setMeetingTimeZone(CalendarItemType result) { // from http://msdn.microsoft.com/en-us/library/bb738399.aspx result.MeetingTimeZone = new TimeZoneType(); result.MeetingTimeZone.TimeZoneName = TimeZoneInfo.Local.StandardName; } private void saveOccurences(int recurringMasterTaskId, List occurences) { foreach (CalendarItemType occurence in occurences) { TaskDALC.InsertTaskOccurence(recurringMasterTaskId, TimeZoneInfo.ConvertTimeFromUtc(occurence.Start, TimeZoneInfo.Local), TimeZoneInfo.ConvertTimeFromUtc(occurence.End, TimeZoneInfo.Local), occurence.ItemId.Id, occurence.ItemId.ChangeKey, "", ""); } } Outlook client could be anywhere and can send a date not in sync with Exchange. So instead of Item.Start we send the date as Item.StartUTC in the script (plus there was a client culture related fix too). Month(It