you can't control the time because, as you found out, the os will change it when the file is closed.
Not all file systems can record creation and last access time and not all file systems
record them in the same manner. For example, on Windows NT FAT, create time has a
resolution of 10 milliseconds, write time has a resolution of 2 seconds, and access time
has a resolution of 1 day (really, the access date). On NTFS, access time has a
resolution of 1 hour. Therefore, the GetFileTime function may not return the same file
time information set using SetFileTime. Furthermore, FAT records times on disk in local
time. However, NTFS records times on disk in UTC, so it is not affected by changes in
time zone or daylight saving time.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Online 21,960 posts
since Aug 2005