SystemTimeToFileTime function

Converts a system time to file time format. System time is based on Coordinated Universal Time (UTC).

Syntax

BOOL SystemTimeToFileTime(
  const SYSTEMTIME *lpSystemTime,
  LPFILETIME       lpFileTime
);

Parameters

lpSystemTime

A pointer to a SYSTEMTIME structure that contains the system time to be converted from UTC to file time format.

The wDayOfWeek member of the SYSTEMTIME structure is ignored.

lpFileTime

A pointer to a FILETIME structure to receive the converted system time.

Return Value

If the function succeeds, the return value is nonzero.

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

Requirements

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

See Also

DosDateTimeToFileTime

FILETIME

FileTimeToDosDateTime

FileTimeToSystemTime

SYSTEMTIME

System Time

Time Functions