Skip to content

Latest commit

 

History

History
107 lines (86 loc) · 3.92 KB

nf-timezoneapi-enumdynamictimezoneinformation.md

File metadata and controls

107 lines (86 loc) · 3.92 KB
UIDtitledescriptionhelpviewer_keywordsold-locationtech.rootms.assetidms.datems.keywordsreq.headerreq.include-headerreq.target-typereq.target-min-winverclntreq.target-min-winversvrreq.kmdf-verreq.umdf-verreq.ddi-compliancereq.unicode-ansireq.idlreq.max-supportreq.namespacereq.assemblyreq.type-libraryreq.libreq.dllreq.irqltargetosreq.typenamesreq.redistms.customf1_keywordsdev_langstopic_typeapi_typeapi_locationapi_name
NF:timezoneapi.EnumDynamicTimeZoneInformation
EnumDynamicTimeZoneInformation function (timezoneapi.h)
Enumerates DYNAMIC_TIME_ZONE_INFORMATION entries stored in the registry.
EnumDynamicTimeZoneInformation
EnumDynamicTimeZoneInformation function
base.enumdynamictimezoneinformation
timezoneapi/EnumDynamicTimeZoneInformation
base\enumdynamictimezoneinformation.htm
winprog
EBB2366A-86FE-4764-B7F9-5D305993CE0A
12/05/2018
EnumDynamicTimeZoneInformation, EnumDynamicTimeZoneInformation function, base.enumdynamictimezoneinformation, timezoneapi/EnumDynamicTimeZoneInformation
timezoneapi.h
Windows.h
Windows
Windows 8 [desktop apps \| UWP apps]
Windows Server 2012 [desktop apps \| UWP apps]
advapi32.lib
advapi32.dll
Windows
19H1
EnumDynamicTimeZoneInformation
timezoneapi/EnumDynamicTimeZoneInformation
c++
APIRef
kbSyntax
DllExport
Kernel32.dll
API-MS-Win-Core-TimeZone-l1-1-0.dll
KernelBase.dll
MinKernelBase.dll
advapi32.dll
EnumDynamicTimeZoneInformation

EnumDynamicTimeZoneInformation function

-description

Enumerates DYNAMIC_TIME_ZONE_INFORMATION entries stored in the registry. This information is used to support time zones that experience annual boundary changes due to daylight saving time adjustments. Use the information returned by this function when calling GetDynamicTimeZoneInformationEffectiveYears to retrieve the specific range of years to pass to GetTimeZoneInformationForYear.

-parameters

-param dwIndex [in]

Index value that represents the location of a DYNAMIC_TIME_ZONE_INFORMATION entry.

-param lpTimeZoneInformation [out]

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

-returns

This function returns DWORD. Possible return values include:

ValueDescription
ERROR_SUCCESSThe operation succeeded.
ERROR_NO_MORE_ITEMSNo more data is available for the given index.
ERROR_INVALID_PARAMETERA parameter is invalid.
Any other valueThe operation failed.

-remarks

The following example demonstrates looping through the potential timezones until ERROR_NO_MORE_ITEMS is returned, indicating that there are no more time zone entries in the registry.

std::vector<DYNAMIC_TIME_ZONE_INFORMATION> possibleTimezones; DYNAMIC_TIME_ZONE_INFORMATION dynamicTimezone = {}; DWORD dwResult = 0; DWORD i = 0; do { dwResult = EnumDynamicTimeZoneInformation(i++, &dynamicTimezone); if (dwResult == ERROR_SUCCESS) { possibleTimezones.push_back(dynamicTimezone); } } while (dwResult != ERROR_NO_MORE_ITEMS);

-see-also

DYNAMIC_TIME_ZONE_INFORMATION

GetDynamicTimeZoneInformationEffectiveYears

close