Fixes #70. The timezone offset field is used, if present, to convert the stored local timestamp to the current timezone on read. The current timezone is set into the offset field when updating a timestamp.
To validate this change, I created files in many different timezones on an exFAT image. I was sure to include TZs that fall on 15 minute offsets. I also accounted for the necessary unmount/mount when changing timezones with fuse-exfat. The systems used to create the files were:
Windows 7
OS X 10.12.6
fuse-exfat-1.3.0 on Mint 18 amd64
fuse-exfat-1.3.0 + this patch
I then generated a dir listing of the exFAT image as read by all 4 systems. In summary:
Windows, OS X, and patched 1.3.0 list all files identically. (Ignoring the mtime cs on the files OS X wrote, which are also not displayed by the unpatched 1.3.0 either.)
Patched 1.3.0 lists files written by unpatched 1.3.0 identically.
Unpatched 1.3.0 incorrectly lists files written by Windows and OS X. This patch fixes that.
Unpatched 1.3.0 incorrectly lists files written by patched 1.3.0 in the same way it incorrectly lists files written by Windows and OS X.
I feel that the last point is acceptable. The point of using exFAT is for OS interoperability, and this patch improves upon that. Additionally, any user with both unpatched and patched systems will see no difference as long as both systems are in the same timezone.
Additionally, I performed a check of all 3 timestamps (mtime, atime, and crtime) to validate that they are all updated correctly. This was done by creating, editing, and accessing files under different timezones.
Fixes #70. The timezone offset field is used, if present, to convert the stored local timestamp to the current timezone on read. The current timezone is set into the offset field when updating a timestamp.
To validate this change, I created files in many different timezones on an exFAT image. I was sure to include TZs that fall on 15 minute offsets. I also accounted for the necessary unmount/mount when changing timezones with fuse-exfat. The systems used to create the files were:
I then generated a dir listing of the exFAT image as read by all 4 systems. In summary:
I feel that the last point is acceptable. The point of using exFAT is for OS interoperability, and this patch improves upon that. Additionally, any user with both unpatched and patched systems will see no difference as long as both systems are in the same timezone.
Full listing results: fuse-exfat-1.3.0-patched-read.txt fuse-exfat-1.3.0-read.txt osx-read.txt windows-read.txt
Additionally, I performed a check of all 3 timestamps (mtime, atime, and crtime) to validate that they are all updated correctly. This was done by creating, editing, and accessing files under different timezones.