J
Joseph Geretz
I'm getting all confused with the various types of filetimes; local and UTC
if I understand that much correctly.
FileInfo FI = new FileInfo(FileSpec);
According to my understanding, I would expect
FI.LastWriteTime.ToFileTimeUtc();
to be equal to
FI.LastWriteTimeUtc.ToFileTime();
According to my (mistaken) understanding, the first gets the local LastWrite
time and then converts it to a UTC FileTime. The second one gets the Last
write time in UTC and then simply converts it to a FileTime. So why do these
come out different?
FI.LastWriteTime
FI.LastWriteTimeUtc
FI.LastWriteTime.ToFileTime
FI.LastWriteTime.ToFileTimeUtc
FI.LastWriteTimeUtc.ToFileTime
FI.LastWriteTimeUtc.ToFileTimeUtc
Specifically, I need to compare the times for two files on separate servers.
I'm pulling my information via Web Services and the two servers may be in
different time zones. How can I get the last write timestamp from both files
in a unified format so that I can see which file was written to more
recently?
Thanks for your help!
- Joe Geretz -
if I understand that much correctly.
FileInfo FI = new FileInfo(FileSpec);
According to my understanding, I would expect
FI.LastWriteTime.ToFileTimeUtc();
to be equal to
FI.LastWriteTimeUtc.ToFileTime();
According to my (mistaken) understanding, the first gets the local LastWrite
time and then converts it to a UTC FileTime. The second one gets the Last
write time in UTC and then simply converts it to a FileTime. So why do these
come out different?
FI.LastWriteTime
FI.LastWriteTimeUtc
FI.LastWriteTime.ToFileTime
FI.LastWriteTime.ToFileTimeUtc
FI.LastWriteTimeUtc.ToFileTime
FI.LastWriteTimeUtc.ToFileTimeUtc
Specifically, I need to compare the times for two files on separate servers.
I'm pulling my information via Web Services and the two servers may be in
different time zones. How can I get the last write timestamp from both files
in a unified format so that I can see which file was written to more
recently?
Thanks for your help!
- Joe Geretz -