Menu
Cutty
  • Chryslers
  • Lutherie
  • YLSNED
  • About
Cutty

Tag: Exchange

Setting timezone for appointment using EWS

Posted on April 4, 2011February 18, 2015 by Iain 'Cutty' Carlin

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.…

+

Recent Posts

  • Lawson – A life in words and music
  • Instrument Making Course
  • Jigging, plating and sanding
  • A building block….
  • Fridays are lutherie days!

Categories

  • Chryslers (1)
  • Cutty's Blog (8)
  • Lutherie (38)
  • You Learn Something New Every Day (40)
©2023 Cutty | Powered by WordPress & Superb Themes