GetDynamicTimeZoneInformationEffectiveYears function (timezoneapi.h)

Gets a range, expressed in years, for which a DYNAMIC_TIME_ZONE_INFORMATION has valid entries. Use the returned value to identify the specific years to request when calling GetTimeZoneInformationForYear to retrieve time zone information for a time zone that experiences annual boundary changes due to daylight saving time adjustments.

Syntax

DWORD GetDynamicTimeZoneInformationEffectiveYears(
  [in]  const PDYNAMIC_TIME_ZONE_INFORMATION lpTimeZoneInformation,
  [out] LPDWORD                              FirstYear,
  [out] LPDWORD                              LastYear
);

Parameters

[in] lpTimeZoneInformation

Specifies settings for a time zone and dynamic daylight saving time.

[out] FirstYear

The year that marks the beginning of the range to pass to GetTimeZoneInformationForYear.

[out] LastYear

The year that marks the end of the range to pass to GetTimeZoneInformationForYear.

Return value

Return code/value Description
ERROR_SUCCESS
The operation succeeded.
ERROR_FILE_NOT_FOUND
The system cannot find the effective years.
ERROR_INVALID_PARAMETER
One of the parameter values is not valid.
Any other value
The operation failed.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps | UWP apps]
Minimum supported server Windows Server 2012 [desktop apps | UWP apps]
Target Platform Windows
Header timezoneapi.h (include Windows.h)
Library advapi32.lib
DLL advapi32.dll

See also

DYNAMIC_TIME_ZONE_INFORMATION

EnumDynamicTimeZoneInformation