Bug 99544 - add camera provided date and time is writting a bad time (one hour minus)
Summary: add camera provided date and time is writting a bad time (one hour minus)
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Import-IconView (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-16 16:22 UTC by ryk
Modified: 2022-01-26 11:42 UTC (History)
1 user (show)

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


Attachments
a screenshot about the commented error (20.29 KB, image/png)
2005-02-17 05:11 UTC, ryk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ryk 2005-02-16 16:22:06 UTC
Version:           0.1 (using KDE 3.3.2,  (3.1))
Compiler:          gcc version 3.3.5 (Debian 1:3.3.5-8)
OS:                Linux (i686) release 2.6.7_v1_

Every time I download my photos (Kodak LS 633 that is recognized like a LS663) with that option activated, the name is wrotte by an hour of difference. I mean:

Photo taked at 16:15 of 2005/02/16, and the EXIF information (readed after download it) says that the photo has been taken at that time, but digikam writtes in the photo name "name_date_15:16_extension"... 

I'm getting crazy, because I can't find anything... I'm iN CET zone (GMT+1, Barcelona).

Thanks
Comment 1 Renchi Raju 2005-02-16 20:08:06 UTC
open the camera window and right click on an image and click on properties and see what does that time say.
Comment 2 ryk 2005-02-17 00:36:33 UTC
It shows the correct time.... :S
Comment 3 ryk 2005-02-17 05:11:24 UTC
Created attachment 9678 [details]
a screenshot about the commented error

Here is a screenshot to show you guys what it's going on with my digikam....
thx


(Debian, woody release, digikam 0.7, with kipi 0.1.0)
Comment 4 Renchi Raju 2005-02-17 16:15:55 UTC
CVS commit by pahlibar: 



use localtime and not utc to generate the exif based filename
BUGS: 99544


  M +2 -3      cameraiconview.cpp   1.16


--- kdeextragear-3/digikam/utilities/cameragui/cameraiconview.cpp  #1.15:1.16
@@ -154,9 +154,8 @@ QString CameraIconView::getTemplatedName
         ext = ext.right( ext.length() - pos - 1);
 
-    struct tm* time_tm = gmtime(&itemInfo->mtime);
-    char* s = new char[100];
+    struct tm* time_tm = ::localtime(&itemInfo->mtime);
+    char s[100];
     strftime(s, 100, QFile::encodeName(dname), time_tm);
     dname  = s;
-    delete [] s;
 
     dname.sprintf(QFile::encodeName(dname), position+1);


Comment 5 ryk 2005-02-21 12:04:38 UTC
thx a lot, sorry, I wasn't able to find that bug by myself and the solution.