none
Encounter ErrorCalendarInvalidTimeZone for standard timezone name: Malay Peninsula Standard Time RRS feed

  • Question

  • Anybody has any idea about this error: ErrorCalendarInvalidTimeZone for standard timezone name: Malay Peninsula Standard Time
    My sample code below

    public string CreateAppointment()
            {
                ExchangeServiceBinding binding = getBinding();

                var calendarItem = new CalendarItemType();
                calendarItem.Subject = "test appointment";
                calendarItem.Start = DateTime.Now;
                calendarItem.End = DateTime.Now.AddMinutes(30);
                calendarItem.StartSpecified = calendarItem.EndSpecified = true;
                calendarItem.Sensitivity = SensitivityChoicesType.Normal;
                calendarItem.Body = new BodyType();
                calendarItem.Body.Value = "test notes";
                calendarItem.Body.BodyType1 = BodyTypeType.Text;

                calendarItem.ReminderMinutesBeforeStart = "15";
                calendarItem.ReminderIsSet = false;
                calendarItem.ReminderIsSetSpecified = false;

                calendarItem.MeetingTimeZone = new TimeZoneType();
                calendarItem.MeetingTimeZone.TimeZoneName = "Malay Peninsula Standard Time";

                var folder = new DistinguishedFolderIdType();
                folder.Mailbox = new EmailAddressType();
                folder.Mailbox.EmailAddress = ***mySmtpMapiAddress***; //removed my real mapi name
                folder.Id = DistinguishedFolderIdNameType.calendar;

                var array = new NonEmptyArrayOfAllItemsType();
                array.Items = new ItemType[1];
                array.Items[0] = calendarItem;

                var createItemRequest = new CreateItemType();
                createItemRequest.SendMeetingInvitations = CalendarItemCreateOrDeleteOperationType.SendToNone;
                createItemRequest.SendMeetingInvitationsSpecified = true;

                createItemRequest.SavedItemFolderId = new TargetFolderIdType();
                createItemRequest.SavedItemFolderId.Item = folder;

                createItemRequest.Items = array;

                CreateItemResponseType response = binding.CreateItem(createItemRequest);
                ResponseMessageType msg = response.ResponseMessages.Items[0];

                ItemInfoResponseMessageType info = (ItemInfoResponseMessageType)msg;

                return info.Items.Items[0].ItemId.Id;
            }
    Wednesday, February 23, 2011 8:20 PM

All replies