Add correct DateTime (editing date) to Exif data

Currently, RT does not save the editing date (Exif tag DateTime) in the exif data of the exported files, only DateTimeOriginal (the date/time the photo was captured). This patch fixes this.
This commit is contained in:
Anna
2024-04-18 16:48:08 +02:00
committed by GitHub
parent a1eaa8f64e
commit 1aea652fea

View File

@@ -317,7 +317,7 @@ void Exiv2Metadata::saveToImage(const Glib::ustring &path, bool preserve_all_tag
std::time_t t = std::time(nullptr);
char mbstr[100];
if (std::strftime(mbstr, sizeof(mbstr), "%Y:%m:%d %H:%M:%S", std::localtime(&t))) {
dst->exifData()["Exif.Image.ModifyDate"] = mbstr;
dst->exifData()["Exif.Image.DateTime"] = mbstr;
}
import_exif_pairs(dst->exifData());