Other msdosfs (fat) time shift / time zone issues

Hi!

While debuggings some synchronisation issues, I found the root cause to be in a "date skew" when mounting FAT filesystems.

When seen on FreeeBSD the date is shifted exactly currently 2h compared to what the same volume mounted on Windows (which I would consider "reference" here). Since I am observing 2h compared to GMT (+1h Greenwich +1h DST) it is very suspicious.
As far as I know, FAT uses local time.
I checked what Linux and Mac do and it is coherent with windows.

Of course, for files created around midnight, this appears as a whole "day shift".

Is there a specific mount option to pass so that GMT vs Local TIme is taken into account?
Else I would consider this a bug.
 
Sure, file a bug report. With Microsoft, 30 years ago.

The underlying bug is that the FAT file system stores file times in local time, but without ever recording anywhere which time zone the file system is in. Most other file systems store file time in UTC (traditionally known as Greenwich), and use local time only for the display. I know that the Linux mount command for FAT (a.k.a. msdos a.k.a. VFat) file systems has an option to correct time zones. But even that only works partially, with daylight savings time it breaks again.

The way I deal with it: I know that all file times on FAT file systems are "wrong", and whenever copying from them, I immediately correct the times; I have a little script which does that.
 
Back
Top