I have a file that was modified either before or after it was sent to me.
However, it was created in a different time zone, so if the modification date is in the timezone of the sender, he was the last to modify it. If it is in my timezone, I modified it.
So, do you know if Windows file modification dates are timezone aware?
Answer
The time zone is an artefact of conversion from "instants" to a human-readable date-and-time in some calendar.
Computers do not like human-readable formats (not as much as humans, at least), so they usually store instants in a zone-neutral format. For instance, in the NTFS file system, time stamps are stored in UTC.
Hence, the file time modification is stored properly as long as whoever modifies it knows the current time. If your Windows system displays "13:19" and believes to be in the GMT-5 time zone, then it infers that the current instant is "18:19" in UTC, and writes as much in the NTFS entrails. However, if the OS displays "13:19" but believes to be in the GMT+3 time zone, then the OS is off by eight hours, even if, for the human looking at the screen, things seem fine.
Another point is that the file modification time is a property of the storage system in which the file is stored, e.g. a file system. When a file is "sent", then that time does not necessarily travels with it. Some archive formats (e.g. Zip) embed the file modification time along with the file. This does not apply to a file sent "as is", attached to an email, will not come with a file modification time.
No comments:
Post a Comment