title: Converting NTFS timestamps to FAT Timestamps
body: <p>I'm writing a file transfer application, and I need to copy files from NTFS to FAT drives. Reading from <a href="http://support.microsoft.com/kb/127830" rel="nofollow noreferrer">http://support.microsoft.com/kb/127830</a>, 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#.</p>
  
  <p>Am I missing something here? When does the time get truncated, and when does it get rounded?</p>
  
  <p>Edit: Add a code sample:</p>
  
  <pre><code>IO.File.GetLastWriteTimeUtc(Source)
  </code></pre>
  
  <p>My NTFS->FAT function is: </p>
  
  <pre><code>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
  </code></pre>