Bug 476390 - Non-destructive date information management
Summary: Non-destructive date information management
Status: REPORTED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Date (show other bugs)
Version: 8.2.0
Platform: Microsoft Windows Microsoft Windows
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-31 22:24 UTC by Paul Eipper
Modified: 2025-04-28 10:44 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Eipper 2023-10-31 22:24:09 UTC
SUMMARY

This is a request for a non-destructive original date storage when editing the metadata for files that don't have date information in them.

If digikam would store a "first seen" row in the database, it could be used to restore timestamps, even if metadata operations overwrite them in the file.

Example usecase:
https://www.reddit.com/r/DataHoarder/comments/uc84fm/all_dates_overwritten_by_todays_date_from_digikam/

STEPS TO REPRODUCE
1. Import an album that has pictures without EXIF date information, only the file modified date as picture original date.
2. Apply metadata transformations to the files without unchecking "Update file modification timestamp when files are modified".
3. Try to apply date manipulations to the files afterwards.

OBSERVED RESULT

4. Notice the original file dates are not stored anywhere to be used as information for date manipulation.

EXPECTED RESULT

5. User could have the option to read the "first seen" file date (eg.: from a new digikam database row?)

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

ADDITIONAL INFORMATION

This report includes a suggestion for the resolution, but the impetus is to have a way to restore lost original timestamp information performed by user actions. Note that this is not a request to undo steps in timestamp operations (ie.: store all editing steps), only to store the first original timestamp as seen by digikam when importing an album, assuming that this should be easier to implement and already useful as a safeguard and utility for date manipulation (eg: using the time stored but changing the date for all images could be done with this information).
Comment 1 Maik Qualmann 2023-11-01 07:41:08 UTC
Git commit f79e9b59375a3d72c370bd49c778349c8bb71b08 by Maik Qualmann.
Committed on 01/11/2023 at 08:39.
Pushed by mqualmann into branch 'master'.

try to restore the creation date when copying/moving files
This does not work on UNIX.

M  +38   -15   core/libs/threadimageio/engine/dfileoperations.cpp

https://invent.kde.org/graphics/digikam/-/commit/f79e9b59375a3d72c370bd49c778349c8bb71b08
Comment 2 Paul Eipper 2023-11-03 02:12:15 UTC
For reference, I have created a script for those that run into this and have a backup of the original files available:
https://gist.github.com/lkraider/83856fca740320751194bdf9c60a2ab6

This allows to keep the edited metadata info for the files, while updating the modified time back to those of the backup.
Comment 3 caulier.gilles 2025-04-11 22:59:30 UTC
Hi,

Referring to to patch from Maik on comment 1, the digiKam 8.7.0 pre-release for Windows have been rebuild from scratch today. Please test with this version to see if the problem is reproducible.

Link to download: https://files.kde.org/digikam/

Thanks in advance

Gilles Caulier