Platform SDK: Exchange 2000 Server |
[This is preliminary documentation and subject to change.]
CDO offers two ways to specify the local time zone: the timezoneid field and the timezone field. The urn:schemas:calendar:timezoneid field uses the values from the CdoTimeZoneId enumeration. These values correspond to the Microsoft® Win32® time zone values used by the operating system. This field is easy to work with, and should be sufficient for most applications.
The urn:schemas:calendar:timezone field provides more flexibility, but is more complicated to use. You can use this field to specify a time zone that is not included in the CdoTimeZoneId_cdo_CdoTimeZoneId_Enum enumeration.
The urn:schemas:calendar:timezone field is a string that contains a VTIMEZONE block, as defined by the iCalendar standard. If this field is specified, the urn:schemas:calendar:timezoneid field is ignored.
Both the Configuration object and the Appointment object have the urn:schemas:calendar:timezoneid and urn:schemas:calendar:timezone fields. CDO does not set the time zone of the Appointment object from the Configuration time zone.
The following example shows you how to create a custom time zone using the urn:schemas:calendar:timezone field. This example creates a time zone that is the same as the United States and Canada, Pacific Time.
Dim Config As New CDO.Configuration Dim timezone As String timezone = timezone & "BEGIN:VTIMEZONE" & vbCrLf timezone = timezone & "TZID:Same as Pacific" & vbCrLf timezone = timezone & "BEGIN:STANDARD" & vbCrLf timezone = timezone & "DTSTART:16010101T020000" & vbCrLf timezone = timezone & "TZOFFSETFROM:-0700" & vbCrLf timezone = timezone & "TZOFFSETTO:-0800" & vbCrLf timezone = timezone & "RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=10;BYDAY=-1SU" & vbCrLf timezone = timezone & "END:STANDARD" & vbCrLf timezone = timezone & "BEGIN:DAYLIGHT" & vbCrLf timezone = timezone & "DTSTART:16010101T020000" & vbCrLf timezone = timezone & "TZOFFSETFROM:-0800" & vbCrLf timezone = timezone & "TZOFFSETTO:-0700" & vbCrLf timezone = timezone & "RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=4;BYDAY=1SU" & vbCrLf timezone = timezone & "END:DAYLIGHT" & vbCrLf timezone = timezone & "END:VTIMEZONE" & vbCrLf Config.Fields(cdoTimeZoneURN) = timezone Config.Fields.Update