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

DevPro Staff

November 5, 2001

1 Min Read
ITPro Today logo in a gray background | ITPro Today

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.

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like