ConvertNetworkTime Function  
 
BOOL WINAPI ConvertNetworkTime(
  DWORD dwNetworkTime,  
  LPSYSTEMTIME lpSystemTime,  
  BOOL bLocalTime  
);

The ConvertNetworkTime function converts the specified network time, adjusting for the local timezone if required. The network time is a 32-bit number, represented as the number of seconds since midnight, 1 January 1900 UTC.

Parameters

dwNetworkTime
The network time to be converted.
lpSystemTime
A pointer to a SYSTEMTIME structure which will be modified for the specified network time.
bLocalTime
A boolean flag that is used to specify if the network time should be adjusted for the local timezone.

Return Value

If the network time could be converted, the function returns a non-zero value. If the network time cannot be converted, or the pointer to the SYSTEMTIME structure is invalid, the function will return zero.

Remarks

The network time value can represent a date and time up to the year 2036.

Requirements

Client: Requires Windows 7, Windows Vista or Windows XP.
Server: Requires Windows Server 2008 or Windows Server 2003.
Header: Include cstools7.h.
Library: Use cstimav7.lib.
Unicode: Implemented as Unicode and ANSI versions.

See Also

ConvertSystemTime