I had an issue with creating appointments in Exchange using EWS. The appointment would create fine, the time would be correct, but the Time Zone set would be Monrovia, Rekiyavik (UMT).
After much searching on the internet, I finally found this article: http://msdn.microsoft.com/en-us/library/cc500306.aspx from which I used the helper method and the following code in my method that calls the EWS appointment creation code (sorry it’s VB but it is old code):
Dim lLocalTimeZone As New TimeZoneType()
lLocalTimeZone.BaseOffset = TimeSpanToXSDuration(TimeZone.CurrentTimeZone.GetUtcOffset(vStartTime))
If vStartTime.IsDaylightSavingTime Then
lLocalTimeZone.TimeZoneName = TimeZone.CurrentTimeZone.DaylightName
Else
lLocalTimeZone.TimeZoneName = TimeZone.CurrentTimeZone.StandardName
End If
appointment.MeetingTimeZone = lLocalTimeZone
Now both the time and the time zone are correctly set.…