Dear All: "Carlos E. R." írta:
On 2014-10-03 22:14, Istvan Gabor wrote:
So if I do the copying the way I described above, after the time shift the file still has the correct local time time-stamp. But if I mount the card after the time shift the time-stamp will be shifted. That is the time-stamps will differ only because the files were copied at different times (ie the filesystems were mounted at different times). I consider this a buggy behavior. The time stamp should always be the same for the same file and shouldn't depend on when the filesystem is mounted.
But... FAT does not store times in UTC, but in local time. The local time valid at the time each file is written. And it does not save the timezone info anywhere.
Yes. It works like that. I do understand this.
So, say you save a file at 3:00 in winter. When you mount it any other time on any part of the world, any time zone, any time of the year, in an msdos system, it will still say 3:00.
Yes, and linux should do the same. That is take that time stamp _literally_ and apply it in the current local time. But linux is "clever": it checks the timestamp of the file on the vfat partition. If that timestamp reflects a time which is in a different daylight saving time period than the computer uses currently, it applies a shift to the time stamp. To make it clear by example: I take a photo in January, the time stamp for the file is in January on the vfat filesystem. I mount the card in June on my computer, which in June uses summer time daylight shift. The computer finds out that the photo was taken in winter and applies a one hour time shift. That is a mistake. The time stamp should not be adjusted in any way it just should be represented as is. For example how the computer knows the dates when the daylight saving have to be applied? It differs in different countries. And not all country uses daylight saving times. As I feel that this thread was a little bit hijacked or at least biased, let me emphasize what I concluded: 1. This problem has nothing to do with preserving time stamps (be it creation time or last modification time) during files copies. 2. This problem is not a time zone problem. The time zone problem is handled by the tz=UTC mount option. 3. This problem is a linux mount or kernel problem: mount applies a time shift; this time shift should not be done. 4. For photos or other files which have time stamps in their metadata (eg exif info), applying that time stamp to the file's last modification (or creation) time is a usable workaround.
What would you think is the most expedient way to get beyond this issue? File bug reports and hold off doing anything till these are handled?
In my case, when I want to preserve the original time stamps of photos, I guess I will use the exiv2 command as John suggested. If I knew who is the developer responsible for linux mount I might write him personal email regarding the issue. Thank you all for your responses. Istvan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org