0

On various newish Linux installations (Mint 19.1, 18.1, Linux Mint Debian, Centos) I have a problem which doesn't show up on older installations (Mint 17.1, 17.3) or Windows.

The problem is that when I view, or save to HD, a file on/from an external device connected via USB, the file time shows up wrong - it has an hour added to it.

So if I have a file recorded at 1200 on a USB device, and the time is correctly displayed on that device (or on an older operating system or Windows), the time shows up as 1300 viewed with or save to a fresh install of a more recent Linux operating system (but correctly as 1200 if I do a live boot of Mint or Knoppix)

RTC is set to UTC. System time and timezone are correct Time is displayed correctly on computer clock (UTC +1)

If I run hwclock at 23:48 I get the following result:

$ sudo  hwclock    
2019-04-11 23:48:05.729587+0100

Is that a clue? I'm pretty sure HWclock is actually showing 22:48 when system time/local time is 23:48.

The files are audio files on a digital voice recorder which uses a FAT16 file system.

I'd be grateful if someone can tell me why this is happening and suggest a good solution.

EDIT: Someone else with the same problem here: Why are the timestamps on my removable media taken as UTC time? Two workarounds are suggested there, but in view of the fact that older Linux systems handle time on an external device perfectly and automatically, is there no better solution?

  • Are you sure it's FAT16? That's a very old file system type (well before USB existed), what OS are you using to write to the USB drive? It could be that the inode data contains a time stamp with a timezone that differs from your own local system. If you run stat [filename] what do you see as the timestamp data? – Bob Dole Apr 11 at 23:27
  • There is a time_offset parameter for mount that seems to be what you need. – Nate Eldredge Apr 12 at 1:10
  • Gparted says it is fat16. The device is a digital voice recorder. It writes audio files to itself and it uses fat16. If I use stat on the file I get the wrong time - even when it is still on the digital voice recorder - eg a file correctly stamped with 02:15 will give a result of 03:15 with stat - except on the older Linux installation. OK, I'll look up time_offset but why does recent Linux not correctly display the real original timestamp? Surely the digital voice recorder has a right to set the timestamp - and Linux should respect that and not mess around with it? – Batey Bates Apr 12 at 10:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.