Author Topic: [Linux] - How to set automount to use local datetime and not UTC for USB FAT32?  (Read 1460 times)

0 Members and 1 Guest are viewing this topic.

Online RoGeorgeTopic starter

  • Super Contributor
  • ***
  • Posts: 6252
  • Country: ro
- The photo camera is using local datetime to store the files on the SD card.
- Pics' EXIF info (that's inside the files) is also using local datetime.
- Windows is using local datetime to read the SD card files.

For some reason Kubuntu's automount (probably any other Linux, too) is using UTC time to interpret the date/time for files stored on the FAT32 SD card.  As an effect, the photo files are copied with a different timestamp than shown by the EXIF or by the camera.

Setting the Linux hardware clock to use local time instead of UTC is not an option ('timedate status' will show a warning when the hw clock is set to local time, telling that hw clock set to local will mess the NTP clock sync and daylight saving time).

I've installed exfat-fuse and exfat-utils (as some googled answer recommended) and even rebooted, but it didn't help.




- What program or service is auto-detecting and auto-mounting an SD-card in Debian (Kubuntu 20.04 LTS)?
- How do I set the automount tools in Linux to use the local time instead of UTC when reading files from an external auto-detected and auto-mounted FAT32 USB SD card?

Offline retiredfeline

  • Frequent Contributor
  • **
  • Posts: 540
  • Country: au
It sounds like Kubuntu is overriding the default FAT mount with tz=UTC option, see mount(8). It works as expected on my Linux distro, times are handled correctly. So you have to figure out how to disable that override on your distro.
 
The following users thanked this post: RoGeorge

Offline DiTBho

  • Super Contributor
  • ***
  • Posts: 3918
  • Country: gb
I don't use ubuntu, but ... look at /etc/fstab, check options there  :-//
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline PKTKS

  • Super Contributor
  • ***
  • Posts: 1766
  • Country: br
It sounds like Kubuntu is overriding the default FAT mount with tz=UTC option, see mount(8). It works as expected on my Linux distro, times are handled correctly. So you have to figure out how to disable that override on your distro.

There is more on this issue.

This is the tip of a problem on the whole buntu thing.

- Automated package management requires a proper time synch ...
- which should be set on the "GUI" thing using that applet thing (EKkkkkS...)

- Several buntu variations require a proper adjust which in several cases present different results DEPENDING ON THE TIME ZONE YOU ARE around the globe..

- When things are totally weird some folks suggest using NTP (aka network time daemon)
- so... the system will use a synched time zone where packages will have sane time stamps.

OK. That said .. I have solved some issues like this using a displaced zone so the system will not make my life miserable forcing weird time configurations.. and worst ... screwing the RTC clock every boot you make

Your mileage will vary..
BUT CERTAINLY THE PROBLEM IS WAY BELOW THIS..

The problem is this fu8ckkkk  AUTO PACKAGE UPDATE thing requiring your system to use a time stamped date...

Slackware and several other distros (not based on APT and *buntu)
can set TZ  properly which will never ever present such odd results..

Your mileage will vary .. try  each one in order..
setting your zone.. then
setting a NTP daemon ..
or (last resource ) manually setting TZ.

Be warned that  the last one may give you time problems when upgrading packages..
(aka package not ready to upgrade no sever XYZ. etc..etc...)
alternative to change  pack repos.

Paul
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf