TzSpecificLocalTimeToSystemTime Function

Converts a local time to a time in Coordinated Universal Time (UTC).

Syntax

C++
BOOL WINAPI TzSpecificLocalTimeToSystemTime(
  __in_opt  LPTIME_ZONE_INFORMATION lpTimeZoneInformation,
  __in      LPSYSTEMTIME lpLocalTime,
  __out     LPSYSTEMTIME lpUniversalTime
);

Parameters

lpTimeZoneInformation [in, optional]

A pointer to a TIME_ZONE_INFORMATION structure that specifies the time zone for the time specified in lpLocalTime.

If lpTimeZoneInformation is NULL, the function uses the currently active time zone.

lpLocalTime [in]

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

lpUniversalTime [out]

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

Return Value

If the function succeeds, the return value is nonzero, and the function sets the members of the SYSTEMTIME structure pointed to by lpUniversalTime to the appropriate values.

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

Remarks

TzSpecificLocalTimeToSystemTime takes into account whether daylight saving time (DST) is in effect for the local time to be converted.

Requirements

Minimum supported clientWindows XP
Minimum supported serverWindows Server 2003
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll

See Also

GetSystemTime
GetTimeZoneInformation
Local Time
SYSTEMTIME
SystemTimeToTzSpecificLocalTime
Time Functions
TIME_ZONE_INFORMATION

Send comments about this topic to Microsoft

Build date: 11/19/2009

Tags :


Page view tracker