Not delved into UTC much but hope it could be the solution to a problem.
I have a small app running that on the hour, every hour, goes through a directory and compares files on a server to those in a local directory.
If a file on the server is not found locally then it downloads it, no probs.
But I need to compare the files themselves as files on the server may be updated: here's where my problem is.
I can't use a byte by byte comparrison because the FileStream object won't allow URI.
So the only other option was to compare the dates of the files.
Problem is, at present I'm comparing the Creation Date/Time, but if I upload it to the server at 10:00:00 and download it and store it localled 30mins later, the creation time locally is 10:30:00 even though it's the same file!
Next hour comes along, the file on the server is still 10:00:00, the file locally is different, so it re-downloads it and saves its creation time as 11:30:00 and on and on and on.
Would looking at UTC solve this issue? If I had a file created on my PC at 16:30:33 and I uploaded it onto a server at 17:03:12 and downloaded it locally at 17:56:46 the UTC Creation time would be 16:30:33?
(hope I've explained that good)
I have a small app running that on the hour, every hour, goes through a directory and compares files on a server to those in a local directory.
If a file on the server is not found locally then it downloads it, no probs.
But I need to compare the files themselves as files on the server may be updated: here's where my problem is.
I can't use a byte by byte comparrison because the FileStream object won't allow URI.
So the only other option was to compare the dates of the files.
Problem is, at present I'm comparing the Creation Date/Time, but if I upload it to the server at 10:00:00 and download it and store it localled 30mins later, the creation time locally is 10:30:00 even though it's the same file!
Next hour comes along, the file on the server is still 10:00:00, the file locally is different, so it re-downloads it and saves its creation time as 11:30:00 and on and on and on.
Would looking at UTC solve this issue? If I had a file created on my PC at 16:30:33 and I uploaded it onto a server at 17:03:12 and downloaded it locally at 17:56:46 the UTC Creation time would be 16:30:33?
(hope I've explained that good)