预约开始和结束时区 [英] appointment start and end timezone

查看:78
本文介绍了预约开始和结束时区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如下所示设置我的exchangeserviceobject。使用Exchange 2010版和指定本地时区。这给了utc +2小时的偏移。 

I instanciate my exchangeserviceobject like below. Using exchange version 2010 and specifying the local time zone. This gives an +2 hour offset to utc. 


ExchangeServer = new ExchangeService(ExchangeVersion.Exchange2010, TimeZoneInfo.FindSystemTimeZoneById("W. Europe Standard Time"));

推荐答案

如果您确实指定了当地时间(例如DateTime.Now,或者任何将其Kind设置为Local的DateTime实例,然后您在计算机的本地时区中指定日期时间,而不是用于实例化ExchangeService的时区。
因此,服务时区中表示的相同日期/时间可能与本地日期/时间不同。

If you are indeed specifying a local time (e.g. DateTime.Now, or any DateTime instance which has its Kind set to Local), then you are specifying the date time in your machine's local time zone, not the time zone you used to instantiate your ExchangeService. Therefore, the same date/time expressed in the service's time zone might not be the same as the local date/time.

如果您使用"未指定"的日期/时间。 date(任何将其Kind设置为Unspecified的DateTime实例),然后EWS Managed API认为它在ExchangeService的时区中表示。

If you use an "unspecified" date (any DateTime instance which has its Kind set to Unspecified) then the EWS Managed API considers it to be expressed in the ExchangeService's time zone.


这篇关于预约开始和结束时区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆