OL 2013+的AppointmentItem.StartTimeZone问题 [英] AppointmentItem.StartTimeZone issue with OL 2013+

查看:132
本文介绍了OL 2013+的AppointmentItem.StartTimeZone问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有OL 2010及更低版本的工作代码,用于为新创建的约会设置时区。 出于某种原因,它在OL 2013及更高版本中失败了,我不知道为什么。 尝试设置StartTimeZone时的异常消息只是"
服务器引发了异常"。 如果重要的话,这就是C ++代码。 我有一个有效的TimeZone对象,甚至尝试从Appointment项中获取当前时区,然后使用相同的值重新设置它,但也失败了。

I have working code for OL 2010 and lower that sets the timezone for a newly created appointment.  For some reason it fails in OL 2013 and higher and I'm not sure why.  The exception message when trying to set the StartTimeZone is just "The server threw an exception".  This is C++ code if that matters.  I have a valid TimeZone object and even tried getting the current timezone from the Appointment item and then re-setting it with the same value and that fails too.

示例代码

TimeZone tz = Appointment.GetStartTimeZone();

TimeZone tz = Appointment.GetStartTimeZone();

tz.getName()< - 显示我的windows时区字符串

tz.getName() <-- shows my windows timezone string

Appointment.SetStartTimeZone(tz)< - 失败,异常

Appointment.SetStartTimeZone(tz) <-- Fails with exception

推荐答案

你好,

Outlook对象模型不提供GetStartTimeZone或SetStartTimeZone方法。所以,我建议在
上询问EWS特定问题
Exchange Server开发 
论坛代替。    

The Outlook object model doesn't provide the GetStartTimeZone nor SetStartTimeZone methods. So, I'd recommend asking EWS specific questions on the Exchange Server Development  forum instead.    

  TimeZone   对象是时区数据的Outlook包装器。此数据可以从Windows注册表项HKEY_LOCAL_MACHINE \ SOFTWARE \ Microoft \ Windows NT \ CurrentVersion \ Times Zones获取。在这个
的情况下,此对象的某些属性属于  TZI   注册表中时区的值。   TZI  
映射到Windows   ; TIME_ZONE_INFORMATION <跨度>&NBSP; 结构。

The TimeZone object is an Outlook wrapper for time zone data. This data can be obtained from the Windows registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. In this case, some properties of this object are parts of in the TZI value for the time zone in the registry. A TZI value is mapped to the Windows TIME_ZONE_INFORMATION structure.


这篇关于OL 2013+的AppointmentItem.StartTimeZone问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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