使用EWS vb.net创建日历约会时的TimeZoneConversionException

时间:2018-06-12 05:00:44

标签: vb.net timezone exchangewebservices appointment

我在使用EWS在vb.net中创建日历约会时遇到问题。我得到以下异常:

  

Microsoft.Exchange.WebServices.Data.TimeZoneConversionException:   无法将2009-01-01T00:00:00.000从(UTC + 8:00)珀斯转换为   世界标准时间。 - > System.ArgumentException:提供的DateTime表示无效时间。例如,当向前调整时钟时,跳过的时间段内的任何时间都是无效的。

我能够阅读约会,但是我无法在Windows Server 2008上收到此错误而无法创建约会。

然而,这在我的电脑上完全正常(Windows 10)

我已经读过这个错误是由于在2009年珀斯停止夏令时之后从未修复的错误导致的,并指定另一个时区将如下工作:

Dim es As New ExchangeService(requestedServerVersion:=ExchangeVersion.Exchange2016, timeZone:=TimeZoneInfo.FindSystemTimeZoneById("Singapore Standard Time"))

我还尝试按如下方式指定时区:

Dim singaporeTime As TimeZoneInfo = TimeZoneInfo.FindSystemTimeZoneById("Singapore Standard Time")
Dim Temp = TimeZoneInfo.ConvertTimeToUtc(DateString, singaporeTime)
appointment.Start = Temp

不幸的是,应用程序需要在此服务器上运行。任何帮助都将不胜感激!感谢

0 个答案:

没有答案
相关问题