[Linux] - How to set automount to use local datetime and not UTC for USB FAT32? - Page 1
Forum section: electronics / general

author: RoGeorge
author_rank: Super Contributor
timestamp: August 18, 2021, 09:29:32 am
content: - The photo camera is usinglocaldatetime to store the files on the SD card.- Pics' EXIF info (that's inside the files) is also usinglocaldatetime.- Windows is usinglocaldatetime 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?

author: retiredfeline
author_rank: Frequent Contributor
timestamp: August 18, 2021, 10:09:13 am
content: It sounds like Kubuntu is overriding the default FAT mount with tz=UTC option, see mount(. 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.

author: DiTBho
author_rank: Super Contributor
timestamp: August 18, 2021, 01:41:03 pm
content: I don't use ubuntu, but ... look at /etc/fstab, check options there

author: PKTKS
author_rank: Super Contributor
timestamp: August 18, 2021, 03:48:32 pm
content: Quote from: retiredfeline on August 18, 2021, 10:09:13 amThere 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 resultsDEPENDING ON THE TIME ZONE YOU AREaround 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 makeYour 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.. thensetting 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