Bug 444501

Summary: Face detection, write name tags (metadata) to file - Changes date and time on photo
Product: [Applications] digikam Reporter: dajomu <dajomu1>
Component: Faces-DetectionAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: metzpinguin
Priority: NOR    
Version First Reported In: 7.3.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In: 7.4.0
Sentry Crash Report:

Description dajomu 2021-10-27 18:04:51 UTC
SUMMARY

I am running digikam 7.3 and did a face detection, enabled write name tags to photo metadata. After tagging several faces I run face recognition and digikam started to change date and time on photos. I did not discover this immediately. Since I upload photos to google photos I saw that old photos appeared as taken in October 2021. Checking the photos, surely the date and time had changed.
There must be something seriously wrong on how digikam processes face detection/recognition/writing name tags to photos. Not sure what exactly is causing this and I do not know how to investigate either. 

STEPS TO REPRODUCE
1. Enable writing name tags to photo
2. run detect faces
3. train algorithm by adding nametags
4. run recognize faces

OBSERVED RESULT
photo time and date should change, maybe

EXPECTED RESULT
no change other than adding name tags to photo

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

ADDITIONAL INFORMATION
Comment 1 Maik Qualmann 2021-10-27 18:11:52 UTC
digiKam certainly does not change the date metadata in images; when it comes to the file date, it can be specified in the digiKam setup under metadata that it is restored. Otherwise we need an image before and after a write of the face metadata.

Maik
Comment 2 dajomu 2021-10-27 20:55:40 UTC
Hi,

my apologies, I think that the fault is in Google photos (GP). I was sure that GP sorted images by creation date, but it seems like they read modified date instead. It is really annoying.
Issue is not with digikam but rather GP.

Can digikam sort images by modified date?
Can digikam change modified date as a batch process? I would like to set modified date to creation date so that GP sort the files properly.
Comment 3 Maik Qualmann 2021-10-28 05:58:43 UTC
If your images do not contain date metadata, e.g. from social networks like WhatsApp, GP uses the file date.

- You can configure digiKam so that it does not change the modification date.
- You can also sort by modification date via the View menu.
- You can set the modification date with the Time Adjust Tool.

Maik
Comment 4 dajomu 2021-11-08 10:08:36 UTC
(In reply to Maik Qualmann from comment #3)
> If your images do not contain date metadata, e.g. from social networks like
> WhatsApp, GP uses the file date.
> 
> - You can configure digiKam so that it does not change the modification date.
> - You can also sort by modification date via the View menu.
> - You can set the modification date with the Time Adjust Tool.
> 
> Maik

Excellent. Bug report can be closed