Hello world!
I'm writing a file transfer application, and I need to copy files from NTFS to FAT drives. Reading from http://support.microsoft.com/kb/127830, I understand that a time such as #11/29/2004 7:31:06 PM, 250ms# should get translated to #11/29/2004 7:31:08 PM, 0ms# when copying to a FAT hard drive. However, what actually happens is that the file time gets truncated to #11/29/2004 7:31:06 PM, 0ms#.
Am I missing something here? When does the time get truncated, and when does it get rounded?
Thanks a lot! CFP
Edit: Add a code sample:
IO.File.GetLastWriteTimeUtc(Source)
My NTFS->FAT function is:
Function NTFSToFATTime(ByVal NTFSTime As Date) As Date
Return (New Date(NTFSTime.Year, NTFSTime.Month, NTFSTime.Day, NTFSTime.Hour, NTFSTime.Minute, NTFSTime.Second).AddSeconds(If(NTFSTime.Millisecond = 0, NTFSTime.Second Mod 2, 2 - (NTFSTime.Second Mod 2))))
End Function