Bug 138880 - digikam 0.9rc2 - 0.9.1rc1 setting file date to exif doesn't work
Summary: digikam 0.9rc2 - 0.9.1rc1 setting file date to exif doesn't work
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Generic-TimeAdjust (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-16 15:29 UTC by Marco Cimmino
Modified: 2018-09-22 08:33 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 0.1.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Cimmino 2006-12-16 15:29:57 UTC
Version:            (using KDE KDE 3.5.5)
Installed from:    Ubuntu Packages
OS:                Linux

Try to set filename date to the same that has exif, for me does nothing at all.
Comment 1 caulier.gilles 2006-12-16 15:46:42 UTC
Witch option are you used to do it ?

Gilles Caulier
Comment 2 Marco Cimmino 2006-12-16 15:48:54 UTC
the only way to reproduce:
- import a photo
- in rc2 there is still the bug that change the date to file
- try to set to exif date with: image - set date and time - to exif
- no result, still the one overwritten by digikam

I really don't know if it's related to the bug just resolved or not.
Comment 3 Marco Cimmino 2006-12-16 16:01:27 UTC
the problem is digikam doesn't change the "modified" date but the "creation" date, also if you use +1 minute, -1 minute... it also affects creation date, that is different than file date, that instead is represented by modified date.

So I'm quite sure this is another different date bug.
Comment 4 caulier.gilles 2006-12-16 18:26:39 UTC
> - in rc2 there is still the bug that change the date to file 

Fixed by Marcel in current implementation from svn.

> - try to set to exif date with: image - set date and time - to exif 

You want mean "Adjust Time & Date" ? If yes it's a problem relevant of a kipi-plugins...

Are you used kipi-plugins from svn trunk ?

Gilles
Comment 5 Marco Cimmino 2006-12-16 18:35:21 UTC
yes sorry, haven't realized that it was provided by kipi-plugins.
I have versione 0.1.2, your version isn't affected?
Comment 6 caulier.gilles 2006-12-16 18:44:21 UTC
Not tested, but i have very improved this plugin. Please give me a feedback...

Gilles
Comment 7 Marco Cimmino 2006-12-16 18:52:02 UTC
I've:
kipi-plugins 0.1.2
libkipi 0.1.4

I think they are the latest stable release.
I have to download svn and try with them?
Comment 8 Angelo Naselli 2006-12-16 22:11:05 UTC
If you want to test kipi-plugins from svn please follow
the steps here:
http://extragear.kde.org/apps/kipi/#svn

Anyway I believe you can try the new beta version (0.1.3)
downloading it from
https://sourceforge.net/project/showfiles.php?group_id=149779

Angelo
Comment 9 Marco Cimmino 2006-12-17 11:14:05 UTC
the problem I cannot compile by myself due to dependencies error in kubuntu 6.10 (cannot install libqt-mt-dev.
Is there some debian/ubuntu packages?
Comment 10 Marco Cimmino 2007-01-02 10:51:46 UTC
Tested with:
digikam 0.9.0 final
libkipi 0.1.5 final
kipi-plugins 0.1.3rc1

bug is still here, modifying date&time to the exif one doesn't change modified file date and time, that it's the one that count.
Comment 11 Marco Cimmino 2007-01-06 13:03:44 UTC
Also modifing a date to a specified one change only "creation" date but NOT "modify" date that IS the filename's date
Comment 12 Marco Cimmino 2007-02-20 17:33:41 UTC
bug still here with:
digikam 0.9.1rc1
libkipi 0.1.5 final
kipi-plugins 0.1.3 final
Comment 13 Achim Bohnet 2007-02-20 18:16:19 UTC
I can confirm in Kubuntu/Edgy too with: digikam 0.9.1-rc1, kipi-plugins 0.1.3.
that the modification date is not updated.

dates before and after applying set file date to exif/iptc date:

$ find Photos/00-TTT/IMG_2266.JPG  -printf "%t | %c | %a | %p/%f\n"
Wed Jul  5 23:17:36 2006 | Wed Jul  5 23:17:36 2006 | Tue Feb 20 18:03:45 2007 | Photos/00-TTT/IMG_2266.JPG/IMG_2266.JPG

$ find Photos/00-TTT/IMG_2266.JPG  -printf "%t | %c | %a | %p/%f\n"
Wed Jul  5 23:17:36 2006 | Wed Jul  5 23:17:36 2006 | Tue Feb 20 18:04:15 2007 | Photos/00-TTT/IMG_2266.JPG/IMG_2266.JPG

Beside the last access time, due to reading from the file, nothing changes.

All EXIF dates I've found are from March 2006, there are no IPTC date
included in the picture (according to Metadata tab).

Achim
Comment 14 caulier.gilles 2007-06-08 22:40:38 UTC
SVN commit 673045 by cgilles:

kipi-plugins from KDE3 branch : Time Adjust plugin : fix modification and access file date accordinly to setting of tool.
BUG: 138880


 M  +10 -9     plugin_timeadjust.cpp  
 M  +10 -9     plugin_timeadjust.h  
 M  +18 -25    timeadjustdialog.cpp  
 M  +10 -9     timeadjustdialog.h  


--- branches/extragear/kde3/libs/kipi-plugins/timeadjust/plugin_timeadjust.cpp #673044:673045
@@ -1,23 +1,24 @@
 /* ============================================================
- * Authors: Jesper K. Pedersen <blackie@kde.org>
- *          Gilles Caulier <caulier dot gilles at gmail dot com>
- * Date   : 2004-05-16
+ *
+ * This file is a part of kipi-plugins project
+ * http://www.kipi-plugins.org
+ *
+ * Date        : 2004-05-16
  * Description : a plugin to set time stamp of picture files.
  *
- * Copyright 2003-2005 by Jesper Pedersen <blackie@kde.org>
- * Copyright 2006 by Gilles Caulier <caulier dot gilles at gmail dot com>
+ * Copyright (C) 2003-2005 by Jesper Pedersen <blackie@kde.org>
+ * Copyright (C) 2006-2007 by Gilles Caulier <caulier dot gilles at gmail dot com>
  *
  * This program is free software; you can redistribute it
  * and/or modify it under the terms of the GNU General
  * Public License as published by the Free Software Foundation;
- * either version 2, or (at your option)
- * any later version.
- *
+ * either version 2, or (at your option) any later version.
+ * 
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *
+ * 
  * ============================================================ */
 
 // KDE includes.
--- branches/extragear/kde3/libs/kipi-plugins/timeadjust/plugin_timeadjust.h #673044:673045
@@ -1,23 +1,24 @@
 /* ============================================================
- * Authors: Jesper K. Pedersen <blackie@kde.org>
- *          Gilles Caulier <caulier dot gilles at gmail dot com>
- * Date   : 2004-05-16
+ *
+ * This file is a part of kipi-plugins project
+ * http://www.kipi-plugins.org
+ *
+ * Date        : 2004-05-16
  * Description : a plugin to set time stamp of picture files.
  *
- * Copyright 2003-2005 by Jesper Pedersen <blackie@kde.org>
- * Copyright 2006 by Gilles Caulier <caulier dot gilles at gmail dot com>
+ * Copyright (C) 2003-2005 by Jesper Pedersen <blackie@kde.org>
+ * Copyright (C) 2006-2007 by Gilles Caulier <caulier dot gilles at gmail dot com>
  *
  * This program is free software; you can redistribute it
  * and/or modify it under the terms of the GNU General
  * Public License as published by the Free Software Foundation;
- * either version 2, or (at your option)
- * any later version.
- *
+ * either version 2, or (at your option) any later version.
+ * 
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *
+ * 
  * ============================================================ */
 
 #ifndef PLUGIN_TIMEADJUST_H
--- branches/extragear/kde3/libs/kipi-plugins/timeadjust/timeadjustdialog.cpp #673044:673045
@@ -1,25 +1,11 @@
-/* ============================================================
- * Authors: Jesper K. Pedersen <blackie@kde.org>
- *          Gilles Caulier <caulier dot gilles at gmail dot com>
- * Date   : 2004-05-16
- * Description : a plugin to set time stamp of picture files.
- *
- * Copyright 2003-2005 by Jesper Pedersen <blackie@kde.org>
- * Copyright 2006-2007 by Gilles Caulier <caulier dot gilles at gmail dot com>
- *
- * This program is free software; you can redistribute it
- * and/or modify it under the terms of the GNU General
- * Public License as published by the Free Software Foundation;
- * either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * ============================================================ */
+7
+// C Ansi includes.
 
+extern "C"
+{
+#include <utime.h>
+}
+
 // Qt includes.
 
 #include <qlayout.h>
@@ -30,6 +16,7 @@
 #include <qhbox.h>
 #include <qcheckbox.h>
 #include <qradiobutton.h>
+#include <qfile.h>
 #include <qspinbox.h>
 #include <qgrid.h>
 #include <qpushbutton.h>
@@ -148,11 +135,11 @@
                                            "(c) 2003-2005, Jesper K. Pedersen\n"
                                            "(c) 2006, Gilles Caulier");
 
-    d->about->addAuthor("Jesper K. Pedersen", I18N_NOOP("Author and maintainer"),
-                       "blackie@kde.org");
+    d->about->addAuthor("Jesper K. Pedersen", I18N_NOOP("Author"),
+                        "blackie@kde.org");
 
-    d->about->addAuthor("Gilles Caulier", I18N_NOOP("Developper"),
-                       "caulier dot gilles at gmail dot com");
+    d->about->addAuthor("Gilles Caulier", I18N_NOOP("Developper and maintainer"),
+                        "caulier dot gilles at gmail dot com");
 
     QPushButton *helpButton = actionButton(Help);
     KHelpMenu* helpMenu = new KHelpMenu(this, d->about, false);
@@ -434,6 +421,12 @@
         dateTime             = updateTime(info.path(), info.time());
         info.setTime(dateTime);
 
+        // See B.K.O #138880: set the file acess and modification time.
+        struct utimbuf ut;
+        ut.modtime = dateTime.toTime_t();
+        ut.actime  = dateTime.toTime_t();
+        ::utime(QFile::encodeName(url.path()), &ut);
+
         if (!d->exif->isChecked())
         {
             if (d->syncEXIFDateCheck->isChecked() || d->syncIPTCDateCheck->isChecked())
--- branches/extragear/kde3/libs/kipi-plugins/timeadjust/timeadjustdialog.h #673044:673045
@@ -1,23 +1,24 @@
 /* ============================================================
- * Authors: Jesper K. Pedersen <blackie@kde.org>
- *          Gilles Caulier <caulier dot gilles at gmail dot com>
- * Date   : 2004-05-16
+ *
+ * This file is a part of kipi-plugins project
+ * http://www.kipi-plugins.org
+ *
+ * Date        : 2004-05-16
  * Description : a plugin to set time stamp of picture files.
  *
- * Copyright 2003-2005 by Jesper Pedersen <blackie@kde.org>
- * Copyright 2006-2007 by Gilles Caulier <caulier dot gilles at gmail dot com>
+ * Copyright (C) 2003-2005 by Jesper Pedersen <blackie@kde.org>
+ * Copyright (C) 2006-2007 by Gilles Caulier <caulier dot gilles at gmail dot com>
  *
  * This program is free software; you can redistribute it
  * and/or modify it under the terms of the GNU General
  * Public License as published by the Free Software Foundation;
- * either version 2, or (at your option)
- * any later version.
- *
+ * either version 2, or (at your option) any later version.
+ * 
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *
+ * 
  * ============================================================ */
 
 #ifndef TIMEADJUSTDIALOG_H