ITimeZone Property Methods

These methods are not supported in Windows CE Platform Builder 3.0.

The property methods of the ITimeZone interface read the properties described in the following table. For more information, see Interface Property Methods.

Properties in Vtable Order

Property Description
Bias
[Visual Basic]
Access: Read
Data Type: Long
[C++]
HRESULT get_Bias
([out] long *plBias);
Returns the current bias, in minutes, for local time translation on this computer. The bias is the difference, in minutes, between Coordinated Universal Time (UTC) and local time. All translations between UTC and local time are based on the following formula:
UTC = local time + bias
SupportsDST
[Visual Basic]
Access: Read
Data Type: Boolean
[C++]
HRESULT get_SupportsDST
([out] VARIANT_BOOL *pbSupportsDST);
Returns whether a time zone supports daylight saving time. TRUE if a time zone supports daylight saving time.

The rest of the properties in this table are defined only if this Boolean property is TRUE.

IsStandardAbsoluteDate
[Visual Basic]
Access: Read
Data Type: Boolean
[C++]
HRESULT get_IsStandardAbsoluteDate
([out] VARIANT_BOOL *pbIsStandardAbsoluteDate);
Returns whether StandardDate is an absolute or relative date. TRUE if StandardDate is an absolute date, or FALSE if it is a relative date.

Undefined if SupportsDST is FALSE.

IsDaylightAbsoluteDate
[Visual Basic]
Access: Read
Data Type: Boolean
[C++]
HRESULT get_IsDaylightAbsoluteDate
([out] VARIANT_BOOL *pbIsDaylightAbsoluteDate);
Returns whether DaylightDate is an absolute or relative date. TRUE if DaylightDate is an absolute date or FALSE if it is a relative date.

Undefined if SupportsDST is FALSE.

StandardDate
[Visual Basic]
Access: Read
Data Type: Date
[C++]
HRESULT get_StandardDate
([out] DATE *pdaStandardDate);
Returns when a time zone enters standard time. Usage depends on whether this is an absolute date, such as October 31, or a relative date, such as the last Sunday in October:
  • If IsStandardAbsoluteDate is TRUE, then ignore the year.
  • If IsStandardAbsoluteDate is FALSE, then use only the hours, minutes, and seconds portion of the date.

Undefined if SupportsDST is FALSE.

StandardBias
[Visual Basic]
Access: Read
Data Type: Long
[C++]
HRESULT get_StandardBias
([out] long *plStandardBias);
Returns the offset in minutes added to a time zone when it is in standard time. This is normally 0.

Undefined if SupportsDST is FALSE.

StandardName
[Visual Basic]
Access: Read
Data Type: String
[C++]
HRESULT get_StandardName
([out] BSTR *pbstrStandardName);
Returns the name of a time zone during standard time.

Undefined if SupportsDST is FALSE.

StandardDayOfWeekMask
[Visual Basic]
Access: Read
Data Type: Long
[C++]
HRESULT get_StandardDayOfWeekMask
([out] long *plStandardDayOfWeekMask);
Returns the day of the week that daylight saving time starts. This property is set to olMonday, olTuesday, olWednesday, olThursday, olFriday, olSaturday, or olSunday.

Undefined if SupportsDST is FALSE.

StandardInstance
[Visual Basic]
Access: Read
Data Type: Long
[C++]
HRESULT get_StandardInstance
([out] long *plStandardInstance);
Returns the week of the month (from 1 to 5) that standard time starts.

Undefined if SupportsDST is FALSE.

StandardMonthOfYear
[Visual Basic]
Access: Read
Data Type: Long
[C++]
HRESULT get_StandardMonthOfYear
([out] long *plStandardMonthOfYear);
Returns the month of the year that standard time starts.

Undefined if SupportsDST is FALSE.

DaylightDate
[Visual Basic]
Access: Read
Data Type: Date
[C++]
HRESULT get_DaylightDate
([out] DATE *pdaDaylightDate);
Returns the date that a time zone enters daylight time. Usage depends on whether this is an absolute date, such April 5, or a relative date, such as first Sunday in April:
  • If IsDaylightAbsoluteDate is TRUE, then ignore the year.
  • If IsDaylightAbsoluteDate is FALSE, then use only the hours, minutes, and seconds portion of the date.

Undefined if SupportsDST is FALSE.

DaylightBias
[Visual Basic]
Access: Read
Data Type: Long
[C++]
HRESULT get_DaylightBias
([out] long *plDaylightBias);
Returns the offset in minutes added to the Bias when the time zone is in daylight saving time. This property is not used if DaylightDate is undefined. In most time zones, the value for this property is –60.

Undefined if SupportsDST is FALSE.

DaylightName
[Visual Basic]
Access: Read
Data Type: String
[C++]
HRESULT get_DaylightName
([out] BSTR *pbstrDaylightName);
Returns the name of this time zone during daylight saving time.

Undefined if SupportsDST is FALSE.

DaylightDayOfWeekMask
[Visual Basic]
Access: Read
Data Type: Long
[C++]
HRESULT get_DaylightDayOfWeekMask
([out] long *plDaylightDayOfWeekMask);
Returns the day of the week that daylight saving time starts. This property is set to olMonday, olTuesday, olWednesday, olThursday, olFriday, olSaturday, or olSunday.

Undefined if SupportsDST is FALSE.

DaylightInstance
[Visual Basic]
Access: Read
Data Type: Long
[C++]
HRESULT get_DaylightInstance
([out] long *plDaylightInstance);
Returns the week of the month (from 1 to 5) that daylight saving time starts.

Undefined if SupportsDST is FALSE.

DaylightMonthOfYear
[Visual Basic]
Access: Read
Data Type: Long
[C++]
HRESULT get_DaylightMonthOfYear
([out] long *plDaylightMonthOfYear);
Returns the month of the year that daylight saving time starts.

Undefined if SupportsDST is FALSE.

The Standard to Daylight Saving Time change is an absolute date if a time change falls on a particular date (such as April 5) every year. The change is a relative date if a time change falls on a particular day of a month (such as the first Sunday in April) every year. The method to find the time and date for Standard to Daylight Saving Time and from Daylight Saving to Standard Time depends on whether IsStandardAbsoluteDate and IsDaylightAbsoluteDate are TRUE or FALSE.

If IsStandardAbsoluteDate or IsDaylightAbsoluteDate isTRUE the date is absolute. To find the time and date that a time zone changes from Daylight Saving Time to Standard Time, get StandardDate and discard the year portion of the date value. To find when a time zone changes from Standard Time to Daylight Saving Time, get DaylightDate, and discard the year portion.

If IsStandardAbsoluteDate or IsDaylightAbsoluteDate is FALSE, the date is relative. To find the day a time zone changes from Daylight Saving Time to Standard Time, get StandardDayOfWeekMask for the day, StandardInstance for the week, and StandardMonthOfYear for the month. For example, these would represent the first Sunday of April as olSunday, 1, and 4 respectively. To find the time for the change, get StandardDate and discard everything but the hours, minutes, and seconds. Use the same method to find when a time zone changes from Standard to Daylight Saving Time. Get the values for DaylightDayOfWeekMask, DaylightInstance, and DaylightMonthOfYear to determine the day. To find the time that for the change to Daylight Saving Time occurs, get DaylightDate and discard everything but the hours, minutes, and seconds.

Return Values

Each property method supports the standard HRESULT return values, including S_OK.

See Also

ITimeZone::Unknown

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.