Did a check. On my camera the date and time is the same as on my computer (give and take some seconds). The date/time of the file on my camera is 1 hour later than the time in the EXIF. This is in the file manager and in dt. Look here and see that there is the +0100 on the date/time, the TZ difference with GMT.

$ exiftool _K705875.PEF | grep 2022
File Modification Date/Time     : 2022:01:17 15:57:30+01:00
File Access Date/Time           : 2022:01:20 01:00:00+01:00
File Inode Change Date/Time     : 2022:01:17 15:57:30+01:00
Modify Date                     : 2022:01:17 14:57:29
Date/Time Original              : 2022:01:17 14:57:29
Create Date                     : 2022:01:17 14:57:29
Date                            : 2022:01:17
$ stat _K705875.PEF
  Bestand: _K705875.PEF
  Grootte: 32438449     Blokken: 63360        IO-blok: 32768 normaal bestand
Apparaat: 821h/2081d   Inode: 435          Koppelingen: 1
Toegang: (0644/-rw-r--r--)   UID: ()   GID: ()
Toegang:   2022-01-20 01:00:00.000000000 +0100
Gewijzigd: 2022-01-17 15:57:30.000000000 +0100
Veranderd: 2022-01-17 15:57:30.000000000 +0100
Ontstaan:  -

To me this means that the problem is not dt. Since we all have this problem with different camera brands and models it is something on the Linux level. I do not think that dt has to solve this. A date/time is not the easiest thing to work with on computers.

For what it's worth. The date after the copy & import into the dt library the date of the of the file becomes the date/time of the import, so bigger differences with the 'real' date/time. If you want to correct this you can do it with the following 2 commands:

  DATE=$(exiftool -p '$DateTimeOriginal' "<picture>" | sed 's/[: ]//g')
  touch -t $(echo $DATE | sed 's/\(..$\)/\.\1/') "<picture>"

Regards,

Marco

Op 20/01/2022 om 19:17 schreef Christian Birzer:
We are talking about the date/time that is shown in the copy&import dialog, right?

I took a look in the source code. There is no exif magic. It's only the file modification time that is used. The timestamp is read from the file and assumed to be a local timestamp. That will be converted according to your 'locale' settings of the system to the text that is shown in the dialog.

Since you OS does not know to which timezone the camera is set the only things left are the timestamp (modification time, not creation time) of the file and the OS time zone and locale settings. The locale settings also define the date format (yyyy-mm-dd vs. dd.mm.yyyy etc.). I see that the latter changes when I change the language setting in preferences from english to german.

Depending on the file system your memory card uses, the time zone offset could be in the timestamp. ExFat for example supports this. FAT does not. So all timestamps on a FAT formatted card are "local".

When I take pictures with my camera with different time zone settings, I get different values for the modification time but they all seem to be at the same timezone even if the card is exFAT. You could check this at your side in linux with the stat command. That should print out the different timestamps including the zone offset.

But if they really differ, than I'm not sure if this can be read out in dt at all.. (and in a platform independent way)


--
Christian Birzer
christ...@christianbirzer.de
www.ChristianBirzer.de
www.500px.com/ChristianBirzer
www.flickr.com/ChristianBirzer
www.facebook.com/Birzer.Christian
www.instagram.com/birzer.christian


____________________________________________________________________________
darktable user mailing list
to unsubscribe send a mail to darktable-user+unsubscr...@lists.darktable.org

Reply via email to