TzSpecificLocalTimeToSystemTimeEx function

Converts a local time to a time with dynamic daylight saving time settings to Coordinated Universal Time (UTC).


BOOL TzSpecificLocalTimeToSystemTimeEx(
  const DYNAMIC_TIME_ZONE_INFORMATION *lpTimeZoneInformation,
  const SYSTEMTIME                    *lpLocalTime,
  LPSYSTEMTIME                        lpUniversalTime



A pointer to a DYNAMIC_TIME_ZONE_INFORMATION structure that specifies the time zone and dynamic daylight saving time.


A pointer to a SYSTEMTIME structure that specifies the local time to be converted. The function converts this time to the corresponding UTC time.


A pointer to a SYSTEMTIME structure that receives the UTC time.

Return Value

If the function fails, the return value is zero. To get extended error information, call GetLastError.


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