Op zaterdag 2 mei 2020 22:55:17 CEST schreef Carlos E. R.:
On 02/05/2020 22.23, Istvan Gabor wrote:
Hello:
This question applies to openSUSE Leap 42.2-15.1 versions and any modern linux OSs.
I would like if I could mount vfat volumes so that the time stamps would be shown 'as is' and not adjusted according to daylight saving time (DST).
Some of you might remember that I had problems with vfat time stamps in linux earlier.
Correct original timestamps of files are crucial for me.
When I make a photo with my camera or record voice with a voice recorder or take a note on mobile phone, time stamps recorded are local timestamp. For me those time stamp have sense in local time only. If the file was saved at 3 pm, for me it is 3 pm, independently of the time zone and summer/winter timeshift.
Well, not independently: I have to manually shift one hour on my cameras at the correct date - and I often forget till I start shooting. If I don't adjust the camera, the local time on the camera is one hour off with the wall clock.
Depends on the camera. Modern ones adjust the time display to DST, older don't. That's when the issue arises, since the older ones calculate the timestamp from the internal clock. That results in the timestamps being off if one doesn't adjust their clock. The computer doesn't know about that, so will display the wrong timestamp half of the year if you don't.
Unfortunately linux can't handle this issue, because when it uses UTC, it converts all time stamps to UTC, and adjust the time stamps according to time zone and summer/winter timeshift.
Because of this I decided to change my system to use local time. I though if I use system local time I don't have to worry about timestamps shifting when I mount vfat volumes.
It is not possible to tell a Linux system to use local time.
Now it turned out, this is not the case. If I mount a vfat volume, the time stamps for the files that were made in the same timeshift are correct, but of those were made in the other timeshift are off by 1 hour.
(For example in summer, timestamps of files recorded in summer are correct, but timestamps of files recorded in winter are less by an hour.)
For me this has no sense, and causes plus work, because before copying the files I have to check if they were taken in summer time of winter time. I have to mount the filesystem twice, once using specific mount options, that is I can't use simple automount. This is tedious and annoying.
Is there any way I can set linux to mount vfat to show the time stamps 'as is', without adjusting them according to DST winter time/summer time?
Not possible. They are different paradigms.
A DOS system runs in local time. A Linux system runs (can be considered to run) in UTC, and calculates the local time. Both display the same time.
You could put your camera on UTC instead, and in Linux do the same for the user that mounts the camera.
Once more, my system is set to local time, that is time zones don't play here.
Impossible, sorry.
Linux runs in UTC. If you artificially change that time to be the local time, Linux still considers it is running in UTC and calculates the local time. Havoc.
-- Gertjan Lettink a.k.a. Knurpht openSUSE Forums Team -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org