Поделиться через


ITimeZone Properties (Windows CE 5.0)

Send Feedback

The ITimeZone interface reads the properties described in the following table.

Properties in Vtable Order

Property Description
Bias
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 = localtime + bias
SupportsDST
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
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
HRESULT get_IsDaylightAbsoluteDate
(/* [out] */ VARIANT_BOOL *pbIsDaylightAbsoluteDate);
Returns whether DaylightDate is absolute or relative. TRUE if DaylightDate is absolute or FALSE if relative.

Undefined if SupportsDST is FALSE.

StandardDate
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
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
HRESULT get_StandardName
(/* [out] */ BSTR *pbstrStandardName);
Returns the name of a time zone during standard time.

Undefined if SupportsDST is FALSE.

StandardDayOfWeekMask
HRESULT get_StandardDayOfWeekMask
(/* [out] */ long *plStandardDayOfWeekMask);
Returns the day of the week daylight-saving time starts. This property is set to olMonday, olTuesday, olWednesday, olThursday, olFriday, olSaturday, or olSunday.

Undefined if SupportsDST is FALSE.

StandardInstance
HRESULT get_StandardInstance
(/* [out] */ long *plStandardInstance);
Returns the week of the month (one to five) standard time starts.

Five always represents the last week, even if the month does not have five weeks, or if the starting day would not fall within the fifth week of that month.

Undefined if SupportsDST is FALSE.

StandardMonthOfYear
HRESULT get_StandardMonthOfYear
(/* [out] */ long *plStandardMonthOfYear);
Returns the month standard time starts.

Undefined if SupportsDST is FALSE.

DaylightDate
HRESULT get_DaylightDate
(/* [out] */ DATE *pdaDaylightDate);
Returns the date that a time zone enters daylight-saving time. Usage depends on whether this is an absolute date, such April 5, or a relative date, such as the first Sunday in April.
  • If IsDaylightAbsoluteDate is TRUE, ignore the year.
  • If IsDaylightAbsoluteDate is FALSE, use only hours, minutes, and seconds.

Undefined if SupportsDST is FALSE.

DaylightBias
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
HRESULT get_DaylightName
(/* [out] */ BSTR *pbstrDaylightName);
Returns the name of this time zone during daylight-saving time.

Undefined if SupportsDST is FALSE.

DaylightDayOfWeekMask
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
HRESULT get_DaylightInstance
(/* [out] */ long *plDaylightInstance);
Returns the week of the month (from one to five) daylight-saving time starts.

Five always represents the last week, even if the month does not have five weeks, or if the starting day would not fall within the fifth week of that month.

Undefined if SupportsDST is FALSE.

DaylightMonthOfYear
HRESULT get_DaylightMonthOfYear
(/* [out] */ long *plDaylightMonthOfYear);
Returns the month of the year daylight-saving time starts.

Undefined if SupportsDST is FALSE.

The change between standard time and daylight-saving time is absolute if it falls on a particular date (such as April 5), and relative if it falls on a particular day (such as the first Sunday in April). The method used to find the times and dates of the changes depends on whether IsStandardAbsoluteDate and IsDaylightAbsoluteDate are TRUE or FALSE.

If IsStandardAbsoluteDate or IsDaylightAbsoluteDate is TRUE the date is absolute.

  • To find when a time zone changes from standard time to daylight-saving time, get DaylightDate and discard the year value.
  • To find when a time zone changes from daylight-saving time to standard time, get StandardDate and discard the year value.

If IsStandardAbsoluteDate or IsDaylightAbsoluteDate is FALSE, the date is relative.

  • To find the day a time zone changes from standard time to daylight-saving time, get DaylightDayOfWeekMask for the day, DaylightInstance for the week, and DaylightMonthOfYear for the month. To find the time for the change, get DaylightDate and discard everything but the hours, minutes, and seconds.
  • 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. To find the time for the change, get StandardDate and discard everything but the hours, minutes, and seconds.

Return Values

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

Requirements

OS Versions: Windows CE 2.0 and later.
Header: Pimstore.h.
Link Library: Pimstore.lib.

See Also

ITimeZone

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.