You're not getting the same time back because you've stripped out the time part by calling
DateTime.Now.Date
.
The Date
property[
^] returns
"a new object with the same date as this instance, and the time value set to 12:00:00 midnight (00:00:00)."
(NB: Because you're running this on a computer in the EST timezone, this will actually be equivalent to 4 AM UTC.)
If you want to include the time, then don't use the
Date
property:
long fileTime = DateTime.Now.ToFileTime();
DateTime theTime = DateTime.FromFileTime(fileTime);