Author: gschneider
Date: Sat Aug 8 16:55:25 2009
New Revision: 42517
URL:
http://svn.reactos.org/svn/reactos?rev=42517&view=rev
Log:
-Use correct conversion factors in FileTimeToUnixTime (increased by factor 1000)
-Prefer time_t to arch specific __time64_t
-Assumption from r42506 was wrong: GetSystemTimeAsFileTime supplies good values
Modified:
trunk/reactos/lib/sdk/crt/include/internal/time.h
Modified: trunk/reactos/lib/sdk/crt/include/internal/time.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/include/intern…
==============================================================================
--- trunk/reactos/lib/sdk/crt/include/internal/time.h [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/include/internal/time.h [iso-8859-1] Sat Aug 8 16:55:25
2009
@@ -10,19 +10,19 @@
#define LEAPDAY 59
static __inline
-__time64_t
+time_t
FileTimeToUnixTime(const FILETIME *FileTime, USHORT *millitm)
{
ULARGE_INTEGER ULargeInt;
- __time64_t time;
+ time_t time;
ULargeInt.LowPart = FileTime->dwLowDateTime;
ULargeInt.HighPart = FileTime->dwHighDateTime;
ULargeInt.QuadPart -= DIFFTIME;
- time = ULargeInt.QuadPart / 10000;
+ time = ULargeInt.QuadPart / 10000000;
if (millitm)
- *millitm = (ULargeInt.QuadPart % 10000) / 10;
+ *millitm = (ULargeInt.QuadPart % 10000000) / 10000;
return time;
}