/**@file\r
\r
-Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
CONST SYSTEMTIME *SystemTime\r
);\r
\r
+typedef\r
+WINBASEAPI\r
+BOOL\r
+(WINAPI *WinNtLocalFileTimeToFileTime) (\r
+ CONST FILETIME *LocalFileTime,\r
+ LPFILETIME FileTime\r
+ );\r
+\r
+\r
typedef\r
WINBASEAPI\r
BOOL\r
//\r
// Win32 Time APIs\r
//\r
+ WinNtLocalFileTimeToFileTime LocalFileTimeToFileTime;\r
WinNtFileTimeToLocalFileTime FileTimeToLocalFileTime;\r
WinNtFileTimeToSystemTime FileTimeToSystemTime;\r
WinNtGetSystemTime GetSystemTime;\r
/**@file\r
\r
-Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
MoveFile,\r
SetFileTime,\r
SystemTimeToFileTime,\r
+ LocalFileTimeToFileTime,\r
FileTimeToLocalFileTime,\r
FileTimeToSystemTime,\r
GetSystemTime,\r
Info->FileSize = FileInfo.nFileSizeLow;\r
Info->PhysicalSize = Info->FileSize;\r
\r
+ PrivateFile->WinNtThunk->FileTimeToLocalFileTime(&FileInfo.ftCreationTime, &FileInfo.ftCreationTime);\r
PrivateFile->WinNtThunk->FileTimeToSystemTime (&FileInfo.ftCreationTime, &SystemTime);\r
Info->CreateTime.Year = SystemTime.wYear;\r
Info->CreateTime.Month = (UINT8) SystemTime.wMonth;\r
Info->CreateTime.Minute = (UINT8) SystemTime.wMinute;\r
Info->CreateTime.Second = (UINT8) SystemTime.wSecond;\r
\r
+ PrivateFile->WinNtThunk->FileTimeToLocalFileTime(&FileInfo.ftLastAccessTime, &FileInfo.ftLastAccessTime);\r
PrivateFile->WinNtThunk->FileTimeToSystemTime (&FileInfo.ftLastAccessTime, &SystemTime);\r
Info->LastAccessTime.Year = SystemTime.wYear;\r
Info->LastAccessTime.Month = (UINT8) SystemTime.wMonth;\r
Info->LastAccessTime.Minute = (UINT8) SystemTime.wMinute;\r
Info->LastAccessTime.Second = (UINT8) SystemTime.wSecond;\r
\r
+ PrivateFile->WinNtThunk->FileTimeToLocalFileTime(&FileInfo.ftLastWriteTime, &FileInfo.ftLastWriteTime);\r
PrivateFile->WinNtThunk->FileTimeToSystemTime (&FileInfo.ftLastWriteTime, &SystemTime);\r
Info->ModificationTime.Year = SystemTime.wYear;\r
Info->ModificationTime.Month = (UINT8) SystemTime.wMonth;\r
goto Done;\r
}\r
\r
+ if (!PrivateFile->WinNtThunk->LocalFileTimeToFileTime (\r
+ &NewCreationFileTime,\r
+ &NewCreationFileTime\r
+ )) {\r
+ goto Done;\r
+ }\r
+\r
NewLastAccessSystemTime.wYear = NewFileInfo->LastAccessTime.Year;\r
NewLastAccessSystemTime.wMonth = NewFileInfo->LastAccessTime.Month;\r
NewLastAccessSystemTime.wDay = NewFileInfo->LastAccessTime.Day;\r
goto Done;\r
}\r
\r
+ if (!PrivateFile->WinNtThunk->LocalFileTimeToFileTime (\r
+ &NewLastAccessFileTime,\r
+ &NewLastAccessFileTime\r
+ )) {\r
+ goto Done;\r
+ }\r
+\r
NewLastWriteSystemTime.wYear = NewFileInfo->ModificationTime.Year;\r
NewLastWriteSystemTime.wMonth = NewFileInfo->ModificationTime.Month;\r
NewLastWriteSystemTime.wDay = NewFileInfo->ModificationTime.Day;\r
goto Done;\r
}\r
\r
+ if (!PrivateFile->WinNtThunk->LocalFileTimeToFileTime (\r
+ &NewLastWriteFileTime,\r
+ &NewLastWriteFileTime\r
+ )) {\r
+ goto Done;\r
+ }\r
+\r
if (!PrivateFile->WinNtThunk->SetFileTime (\r
PrivateFile->IsDirectoryPath ? PrivateFile->DirHandle : PrivateFile->LHandle,\r
&NewCreationFileTime,\r