2 out of 9 rated this helpful - Rate this topic

FileTimeToLocalFileTime function

Converts a file time to a local file time.

Syntax


BOOL WINAPI FileTimeToLocalFileTime(
  _In_   const FILETIME *lpFileTime,
  _Out_  LPFILETIME lpLocalFileTime
);

Parameters

lpFileTime [in]

A pointer to a FILETIME structure containing the UTC- based file time to be converted into a local file time.

lpLocalFileTime [out]

A pointer to a FILETIME structure to receive the converted local file time. This parameter cannot be the same as the lpFileTime parameter.

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.

Remarks

FileTimeToLocalFileTime uses the current settings for the time zone and daylight saving time. Therefore, if it is daylight saving time, this function will take daylight saving time into account, even if the time you are converting is in standard time. You can use the following sequence of functions as an alternative.

  1. FileTimeToSystemTime
  2. SystemTimeToTzSpecificLocalTime
  3. SystemTimeToFileTime

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

FileAPI.h (include Windows.h);
WinBase.h on Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

See also

File Times
FILETIME
LocalFileTimeToFileTime
Time Functions

 

 

Send comments about this topic to Microsoft

Build date: 10/26/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.