GetTimeZoneInformation
GetTimeZoneInformation retrieves the current time-zone settings. These settings control the translations between system time in Coordinated Universal Time (UTC) and local time.
Syntax
DWORD GetTimeZoneInformation(
LPTIME_ZONE_INFORMATION lpTimeZoneInformation
);
Parameters
lpTimeZoneInformation
A pointer to a TIME_ZONE_INFORMATION structure to receive the current settings.
Return Value
If the function succeeds, it returns one of the following values:
| Value | Description |
|---|---|
|
TIME_ZONE_ID_UNKNOWN |
The system cannot determine the current time zone. If daylight savings time is not used in the current time zone, this value is returned because there are no transition dates. |
| TIME_ZONE_ID_STANDARD | The system is operating in the range covered by the StandardDate member of the TIME_ZONE_INFORMATION structure. |
| TIME_ZONE_ID_DAYLIGHT | The system is operating in the range covered by the DaylightDate member of the TIME_ZONE_INFORMATION structure. |
If the function fails, it returns TIME_ZONE_ID_INVALID.
To get extended error information, call GetLastError.
Remarks
All translations between UTC and local time are based on the following formula.
UTC = local time + bias
The bias is the difference, in minutes, between UTC and local time.
Requirements
| Minimum supported version | Header | Library |
|---|---|---|
|
eRTOS 1.0 SDK |
windows.h | rtkrnl.lib |
See Also: