title: not being able to convert from FILETIME (windows time) to dateTime ( I get a different date )
body: <p>Most of the files I read get the right time when using the following method to convert:</p>
  
  <pre><code>// works great most of the time
  private static DateTime convertToDateTime(System.Runtime.InteropServices.ComTypes.FILETIME time)
  {
      long highBits = time.dwHighDateTime;
      highBits = highBits &lt;&lt; 32;
      return DateTime.FromFileTimeUtc(highBits + time.dwLowDateTime);
  }
  </code></pre>
  
  <p>Here I have an example in visual studio to show how this method sometimes does not work for example I will show the actual file in my computer and the debug. So the file that happens to be in my debug is:  </p>
  
  <p>"A:\Users\Tono\Documents\Visual Studio 2010\Projects\WpfApplication4\WpfApplication4\obj\x86\Debug\App.g.cs"
  <img src="https://i.stack.imgur.com/T4T08.png" alt="enter image description here"></p>
  
  <p>And here is the FILETIME that I am trying to convert to DateTime  "I need the LastWriteTime by the way"</p>
  
  <p><img src="https://i.stack.imgur.com/huVwS.png" alt="enter image description here"></p>
  
  <p>Here you can see that dwHighDateTime = 30136437 and also that dwLowDateTime = -2138979250 from that file.</p>
  
  <p>And when I run my method plus other techniques I get the following dates:
  <img src="https://i.stack.imgur.com/Y20q1.png" alt="enter image description here"></p>
  
  <p>So so far everything seems to be working great. But why is that that when I browse and look for that specific file in windows I get a different date !? Here is the date that I get when seeing the file's properties:
  <img src="https://i.stack.imgur.com/nnvYq.png" alt="enter image description here"></p>
  
  <p>Why does the dates don't match?  What am I doing wrong? </p>