Bug 470226

Summary: Created date wrong in import main view and folder creation
Product: [Applications] digikam Reporter: KaiB <kaizubg>
Component: Import-MainViewAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles, metzpinguin
Priority: NOR    
Version First Reported In: 8.1.0   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 8.1.0
Sentry Crash Report:
Attachments: Screen dump
attachment-3160632-0.html
attachment-3295859-0.html

Description KaiB 2023-05-24 20:52:49 UTC
Created attachment 159227 [details]
Screen dump

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. The photos are taken between 21:00 and 24:00 o'clock (in Finland) of a given day. The time is set correctly in the camera.
2. Start the import tool 
3. Start the downloading (the creating of date folders enabled)

OBSERVED RESULT
First two observations can be seen on the screen copy attached.

In the main view of the import tool (stage 2.) the Created date and time are shifted by three hours. 

After the downloading has been completed the pictures taken between 21:00 and 24:00 o'clock are placed in a folder of the next day.

If I search for the pictures taken eg.  between 23.5.23 00.00 and 23.5.23 23.59 all the pictures are found correctly.


EXPECTED RESULT
Import main view should show the correct date and time

The photo should be placed in the correct folder folder on the file system

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Fedora 37 & Gnome
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
The bug can be found on the versions 7.10, 8.0 & 8.1.
Comment 1 caulier.gilles 2023-05-25 05:49:29 UTC
Check if the option to handle camera item metadata while downloading is turned on. It's explained here:

https://docs.digikam.org/en/import_tools/advanced_import.html#file-renaming-options

Option is located here :

https://docs.digikam.org/en/setup_application/camera_settings.html#camera-behavior

Note: this will only work with USB Mass storage device, not the GPhoto2 compatible devices.

Gilles Caulier
Comment 2 Maik Qualmann 2023-05-25 05:56:45 UTC
From digiKam-8.0.0 the folder creation is no longer dependent on the digiKam camera settings->metadata. The date is taken from the image directly after the download. Note that digiKam doesn't use the relatively new Exif:TimeOffset metadata yet, there are already requests for that. Please provide a sample image to reproduce the problem.

Maik
Comment 3 caulier.gilles 2023-05-25 06:55:24 UTC
Hi Maik,

I don't take a care about the new specificity of the date creation of album form Album tool.

So which mechanism always depend of the metadata settings from Import tool now ?

Gilles
Comment 4 Maik Qualmann 2023-05-25 08:09:32 UTC
Hi Gilles,

Only the current view of the import view depends on the camera metadata setting, i.e. metadata viewer of the sidebar, date in the thumbnail, etc.
After the download, all metadata operations are then performed via DMetadata from the downloaded images.
Therefore, there can be a difference between the import view and the real metadata determined later.

This means that the folder date can never be wrong again, regardless of whether the camera metadata is enabled or disabled

Since the downloaded metadata date is probably also incorrect in this bug report, I suspect that ExifTool is involved, since the screenshot shows that ExifTool has appended the time zone to the date. Probably because Exiv2 produces a warning or error with these images.
Therefore a sample image is absolutely necessary, I cannot reproduce the problem here with my Nikon images.

Maik
Comment 5 KaiB 2023-05-25 13:52:34 UTC
Created attachment 159251 [details]
attachment-3160632-0.html

Hi,

Here is a link to the original SOOC jpg file visible on the screen
dump.

https://drive.google.com/file/d/1gNAc5hiFWsy04xcwu24tw0XUpkFo-zel/view?usp=drive_link

Can't load it due to the size restriction.

Best regards,

Kai


to, 2023-05-25 kello 05:56 +0000, Maik Qualmann kirjoitti:
> https://bugs.kde.org/show_bug.cgi?id=470226
> 
> --- Comment #2 from Maik Qualmann <metzpinguin@gmail.com> ---
> From digiKam-8.0.0 the folder creation is no longer dependent on the
> digiKam
> camera settings->metadata. The date is taken from the image directly
> after the
> download. Note that digiKam doesn't use the relatively new
> Exif:TimeOffset
> metadata yet, there are already requests for that. Please provide a
> sample
> image to reproduce the problem.
> 
> Maik
>
Comment 6 Maik Qualmann 2023-05-25 20:27:05 UTC
I can't reproduce any problem with the sample image. As I said, the display in the import view depends on whether reading of the metadata is activated in the digiKam camera settings (makes the transfer slower). The downloaded image will be saved in a "2023-05-23" folder.

Maik
Comment 7 KaiB 2023-05-27 05:39:51 UTC
Created attachment 159280 [details]
attachment-3295859-0.html

to, 2023-05-25 kello 20:27 +0000, Maik Qualmann kirjoitti:

Hi,

Thanks for the instruction. Can confirm my bug as solved.

Regards,

Kai
Comment 8 caulier.gilles 2023-05-28 07:53:14 UTC
Git commit dba49b3b56ae48c8edd0af255cb9cc082fd7e791 by Gilles Caulier.
Committed on 28/05/2023 at 07:51.
Pushed by cgilles into branch 'master'.

digiKam online documentation: add a small section to explain the metadata post-processing done after donwloading to before the import in collections.

M  +7    -0    import_tools/advanced_import.rst

https://invent.kde.org/documentation/digikam-doc/-/commit/dba49b3b56ae48c8edd0af255cb9cc082fd7e791