Bug 81148

Summary: Properties jpg-photo file incorrect displayed
Product: [Applications] konqueror Reporter: Freek de Kruijf <f.de.kruijf>
Component: generalAssignee: Maksim Orlovich <maksim>
Status: RESOLVED FIXED    
Severity: minor CC: johannes.schwall
Priority: NOR    
Version: 3.1.4   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:

Description Freek de Kruijf 2004-05-08 15:48:39 UTC
Version:           3.1.4 (using KDE 3.1.4)
Installed from:    SuSE
Compiler:          gcc version 3.3.1 (SuSE Linux)
OS:          Linux (i686) release 2.4.21-202-default

While viewing the properties of a jpg file made with a camera, the creation date/time is displayed twice; most likely from two positions in the jpg-file. However using od -a, which makes an ASCII dump of such a file shows a slightly different time; in the seconds.
Output of od -a is:
0000760  fs nul nul nul  nl nul nul nul   2   0   0   4   :   0   1   :
0001000   3   0  sp   1   8   :   5   8   :   3   3 nul   2   0   0   4
0001020   :   0   1   :   3   0  sp   1   8   :   5   8   :   3   3 nul

So date/time is 2004:01:30 18:58:33. Properties displays this as 01/30/04 06:58:03 pm, which is OK except for the seconds. Note the 33 seconds has changed in 03 seconds. This is the bug.
There are other positions in the jpg-file where the same date/time is present; all contain 33 seconds. I can send a jpg-file with this behaviour (809kB). With other files the date/time shows correct values.
Comment 1 Maksim Orlovich 2004-05-08 18:05:30 UTC
Silly off-by-one in kfile-jpeg. will commit a fix shortly
Comment 2 Maksim Orlovich 2004-05-08 18:06:55 UTC
CVS commit by orlovich: 

Fix off-by-one in second extraction in date parsing (#81148)
CCMAIL:81148-done@bugs.kde.org


  M +1 -1      kfile_jpeg.cpp   1.18


--- kdegraphics/kfile-plugins/jpeg/kfile_jpeg.cpp  #1.17:1.18
@@ -464,5 +464,5 @@ QDateTime KJpegPlugin::parseDateTime( co
     QString hour    = string.mid( 11, 2 );
     QString minute  = string.mid( 14, 2 );
-    QString seconds = string.mid( 18, 2 );
+    QString seconds = string.mid( 17, 2 );
 
     bool ok;


Comment 3 Maksim Orlovich 2004-06-12 17:57:24 UTC
*** Bug 83169 has been marked as a duplicate of this bug. ***