Insert USB stick oder SD card: file time always +02:00

,

Hello,

I noticed that when I plug in an USB stick from another computer (windows) or my SD card from my camera the time of the files are always + 02:00 h.
This was a problem for me on Fedora 35. Now I did a update to Fedora 36 but the issue is still there.
The time zone and date/time in settings are correct.

When I plug in the SD card on a Windows computer the time is correct.

It seems that the OS is adding 2 hours to the creation time.

When I run a Live-ISO with Fedora, changing the time/date/timezone and after that I plug in my SD card the time is right.
The camera time is also set correct.

Can somebody tell me whats wrong?

Please answer in “simple” english :slight_smile:
Thank you

what’s the filesystem on that SD card?

shall we have a look at the output of
stat /run/media/<yourusername>/TITANIUM/Erstellt-1246.txt?

if the different dates are recorded in different timezones, you can use
TZ=UTC stat /run/media/<yourusername>/TITANIUM/Erstellt-1246.txt

Just to be sure, timedatectl reports the correct time on your machine?

Following post could be interesting to you: datetime - What time zone does a FAT32 SD card record timestamps in? - Stack Overflow

1 Like

The filesystem on the SD card is FAT.

stat /run/media/aundw/TITANIUM/Erstellt-1246.txt
 Datei: /run/media/aundw/TITANIUM/Erstellt-1246.txt
 Größe: 0         	Blöcke: 0          EA Block: 4096   reguläre leere Datei
Device: 253,1	Inode: 1359        Links: 1
Zugriff: (0644/-rw-r--r--)  Uid: ( 1000/   aundw)   Gid: ( 1000/   aundw)
Kontext: system_u:object_r:dosfs_t:s0
Zugriff: 2022-05-12 02:00:00.000000000 +0200
Modifiziert: 2022-05-12 14:46:44.000000000 +0200
Geändert: 2022-05-12 14:46:43.080000000 +0200
Geburt: -

And timedatectl says:

           Local time: Do 2022-05-12 15:18:45 CEST
           Universal time: Do 2022-05-12 13:18:45 UTC
                 RTC time: Do 2022-05-12 13:18:45
                Time zone: Europe/Berlin (CEST, +0200)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no

Can you use this?

1 Like

The FAT file system does not record the same data as the linux file system (ext4 or other). Thus when a usb device using FAT is connected the system fills in the data that is not available. Thus the dates & times you see.

Thank you.
The strange thing is when I run Fedora as Live-Image everything is fine and the time of the files is shown correctly (on SD-card or USB-Stick).

1 Like

I did a fresh install of Fedora 36 on an unused notebook.
Everything is fine. The time is shown correct with various SD cards or USB sticks.

So I think I will have to reinstall Fedora when the time is right.

EDIT:
Or maybe it is possible to reinstall the “time-service”?

reinstalling seems overkill. (I only reinstall my system about once every 5 years, I have a F36 machine that I have been upgrading since F23, working flawlessly!)

I would have started with reformatting the SD card from your Fedora system.
Also, I would have suggested to use the exfat file system instead of ancient FAT.

your “time-service” was running fine, as we could see from your timedatectl command above.

Glad it’s working now…

1 Like

I don’t think the SD card or the USB stick is the problem. On a fresh install of Fedora it’s working.
Using another file system than FAT is not possible because my Cameras need to have SD cards with FAT file system.

No, I will not reinstall my main computer only because of this cosmetic problem.
The problem with the create time on SD cards or USB sticks is new since some weeks. Never had problems with it before. And sometimes in the last time there were days the time was shown correct.