0

I have one 8TB USB-mounted drive (exfat) on an Ubuntu 20.04 server. The files on there seem to have stayed an hour behind. This is giving various rsync and rclone jobs quite a workout! Any ideas from the community how this happened, and how to fix it, would REALLY be appreciated.

I admit to not knowing how the time-zone changes are shown in directory inquiries. Do the file timestamps exist in UTC and get translated as needed?

DavidF
  • 178
  • 1
  • 12

1 Answers1

1

Most file systems record time stamps as UTC, and tools convert to the time zone active in the current process (so you can just use TZ=UTC ls -l and get a listing with UTC time stamps).

The FAT based file systems are an exception: these use local time, and convert to UTC when reading, and the time stamp is then converted back to local time for display.

The conversion in the file system layer is a simple offset, while the conversion for display uses the historic time zone information, so a file modified last week will have the DST offset applied to it in the file system layer (because it is active now), and no DST offset applied in the display layer (because it wasn't active at the time).

You can mount FAT based file systems with the tz=UTC option to disable the offset in the file system layer, or time_offset= to specify the number of minutes to adjust, but the file system layer in the kernel does not have the same complex conversion functions that exist for applications.

Simon Richter
  • 3,171
  • 18
  • 14
  • This is probably the issue. I will soon have an opportunity to reformat this drive: xfs, here we come. – DavidF Mar 20 '21 at 11:30
  • I had to let the reset of date-time run its course. Even though it took over a day, nothing else I could think of was going to be quicker. – DavidF Mar 20 '21 at 11:31