UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:timezoneapi.EnumDynamicTimeZoneInformation | EnumDynamicTimeZoneInformation function (timezoneapi.h) | Enumerates DYNAMIC_TIME_ZONE_INFORMATION entries stored in the registry. |
| 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 |
|
|
|
|
|
|
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.
Index value that represents the location of a DYNAMIC_TIME_ZONE_INFORMATION entry.
Specifies settings for a time zone and dynamic daylight saving time.
This function returns DWORD. Possible return values include:
Value | Description |
---|---|
ERROR_SUCCESS | The operation succeeded. |
ERROR_NO_MORE_ITEMS | No more data is available for the given index. |
ERROR_INVALID_PARAMETER | A parameter is invalid. |
Any other value | The operation failed. |
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);