[NTFS]
authorPierre Schweitzer <pierre@reactos.org>
Wed, 15 Oct 2014 20:23:47 +0000 (20:23 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Wed, 15 Oct 2014 20:23:47 +0000 (20:23 +0000)
Implement NtfsDateTimeToFileTime() which convert epoch time (1970) to Windows time (1601)

svn path=/trunk/; revision=64752

reactos/drivers/filesystems/ntfs/misc.c
reactos/drivers/filesystems/ntfs/ntfs.h

index 11ce46b..c365f03 100644 (file)
@@ -97,4 +97,16 @@ NtfsAllocateIrpContext(PDEVICE_OBJECT DeviceObject,
     return IrpContext;
 }
 
+/* See:
+ -> http://msdn.microsoft.com/en-us/library/ms724228
+ -> http://bos.asmhackers.net/docs/filesystems/ntfs/standard.html#layout
+ */
+VOID
+NtfsDateTimeToFileTime(ULONGLONG NtfsTime,
+                       PLARGE_INTEGER SystemTime)
+{
+
+    SystemTime->QuadPart = NtfsTime + 116444736000000000;
+}
+
 /* EOF */
index 1333a24..2974969 100644 (file)
@@ -680,11 +680,13 @@ VOID
 CdfsSwapString(PWCHAR Out,
               PUCHAR In,
               ULONG Count);
+#endif
 
 VOID
-CdfsDateTimeToFileTime(PFCB Fcb,
-                      TIME *FileTime);
+NtfsDateTimeToFileTime(ULONGLONG NtfsTime,
+                       PLARGE_INTEGER SystemTime);
 
+#if 0
 VOID
 CdfsFileFlagsToAttributes(PFCB Fcb,
                          PULONG FileAttributes);