Skip navigation

Function Figure Out the Current Time Zone Offset to Return Localized Time From UTC

A common problem with working with calendar items in ADO is that when you read the scheduling properties they are stored in Universal Time Code (UTC). Often developers hard code the time zone offset - which then doesn't work when the application is moved or doesn't take into account daylight savings... The following Function uses CDO to figure out the current time zone offset and can be used to return localized times using the ADO property value, the offset (using the GetUTCDiff function) , and the DateAdd function from VB.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.