Sharepoint 2010 更新时EWS邀请的时区不正确

Sharepoint 2010 更新时EWS邀请的时区不正确,sharepoint-2010,timezone,exchange-server,Sharepoint 2010,Timezone,Exchange Server,我试图在更新任何现有约会时指定EWS邀请的时区。 这是我的密码: ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP1, TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time")); service.Credentials = new WebCredentials("ews_calendar", PASSWORD, "acme")

我试图在更新任何现有约会时指定EWS邀请的时区。 这是我的密码:

ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP1, TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time"));
service.Credentials = new WebCredentials("ews_calendar", PASSWORD, "acme");
service.Url = new Uri("https://acme.com/EWS/Exchange.asmx");

Appointment newAppointment = new Appointment(service);
newAppointment.Subject = "Test Subject";
newAppointment.Body = "Test Body";
newAppointment.Start = new DateTime(2012, 02, 28, 17, 00, 0);
newAppointment.End = newAppointment.Start.AddMinutes(30);
newAppointment.RequiredAttendees.Add("tin.tin@acme.com");

//When: Tuesday, February 28, 2012 5:00 PM-5:30 PM. (UTC-05:00) Eastern Time (US & Canada)
newAppointment.Save(SendInvitationsMode.SendToAllAndSaveCopy);

string itemId = newAppointment.Id.ToString();

Appointment existingAppointment = Appointment.Bind(service, new ItemId(itemId));
existingAppointment.Start = new DateTime(2012, 02, 28, 18, 00, 0);
existingAppointment.End = existingAppointment.Start.AddMinutes(30);

//When: Tuesday, February 28, 2012 11:00 PM-11:30 PM. UTC
existingAppointment.Update(ConflictResolutionMode.AlwaysOverwrite, SendInvitationsOrCancellationsMode.SendToAllAndSaveCopy);
EWS在创建新约会(newAppointment.Save in the super code)并向与会者发送邀请时使用适当的时区(UTC-05:00)。但当EWS更新任何现有约会并发送更新的邀请时,它会使用不正确的时区作为UTC


请注意,我在创建exchange服务对象实例时指定了“东部标准时间”时区。

当您的exchange服务对象被实例化为以下对象时,尝试在约会对象上设置StartTimeZone和EndTimeZone属性:

ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP1);

StartTimeZone和EndTimeZone属性的行为因运行的Microsoft Exchange Server版本而异。查看更多详细信息:。

我还尝试设置现有约会的StartTimeZone和EndTimeZone,但没有成功。existingAppointment.StartTimeZone=TimeZoneInfo.FindSystemTimeZoneById(“东部标准时间”);existingAppointment.EndTimeZone=TimeZoneInfo.FindSystemTimeZoneById(“东部标准时间”);您是否更改了服务实例
新的ExchangeService(ExchangeVersion.Exchange2010\u SP1)也是?是的。仍然是UTC时区。现有的约会时区是什么<代码>约会.Bind(服务,新项目ID(项目ID)).StartTimeZone约会.绑定(服务,新项目ID(项目ID)).StartTimeZone为空。