Click to Rate and Give Feedback
MSDN
MSDN Library
System Services
Time
Time Reference
Time Functions
 FileTimeToLocalFileTime Function
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

ClientRequires Windows Vista, Windows XP, or Windows 2000 Professional.
ServerRequires Windows Server 2008, Windows Server 2003, or Windows 2000 Server.
HeaderDeclared in Winbase.h; include Windows.h.
LibraryUse Kernel32.lib.
DLLRequires Kernel32.dll.

See Also

File Times
FILETIME
LocalFileTimeToFileTime
Time Functions


Send comments about this topic to Microsoft

Build date: 10/2/2008

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker