Bug 400217 - Incorrect Video date/time information: shifted by 2 hours
Summary: Incorrect Video date/time information: shifted by 2 hours
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Video (show other bugs)
Version: 6.0.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-23 20:20 UTC by Nicofo
Modified: 2018-10-24 17:24 UTC (History)
2 users (show)

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


Attachments
DK printscreen (100.46 KB, image/png)
2018-10-23 20:20 UTC, Nicofo
Details
ignoreUTC.patch (1022 bytes, patch)
2018-10-23 21:26 UTC, Maik Qualmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nicofo 2018-10-23 20:20:00 UTC
Created attachment 115857 [details]
DK printscreen

SUMMARY
The date/time information related to videos is wrong: 2 hours in advance.
(Could it be because I'm in CET time zone which is UTC+2 in summer ??)

An example to illustrate that:
- At 21h42 I make a picture
- At 21h43 I make a video
- I import these 2 files in Digikam.

See the result in the printscreen.
* for the picture -> OK (21h42)
* for the video -> NOT OK (23h43 instead of 21h43!! However it displays correctly that the modification time is 21h43)

There is for sure a difference in the treatment of picture and video.

Note 1: the file time stamp is correct for both files (21h4x).
Note 2: as a result, mixed directory with pictures AND video cannot be sorted by time: the sorting is not correct.
Comment 1 Nicofo 2018-10-23 20:31:06 UTC
See original picture and video in attached zip file

(too big (8 MB) to upload it in Bugzilla so see in http://nicofo.tuxfamily.org/tmp/example.zip  )
Comment 2 Maik Qualmann 2018-10-23 21:05:34 UTC
Interestingly, the camera saves as a string the local date/time with the extension "Z" at the end for a UTC time. That's wrong, of course. A test with my Nikon but gives the same problem. So, if we convert that "UTC" time to a local, then of course a wrong time has to come out of it. The only question is if all cameras behave that way and we simply ignore the "Z". Gilles, what does your camera do?

Maik
Comment 3 Maik Qualmann 2018-10-23 21:26:26 UTC
Created attachment 115858 [details]
ignoreUTC.patch
Comment 4 caulier.gilles 2018-10-23 22:09:14 UTC
No Z at end of video date for the Sony camera, but i remember to already seen this kind of suffix in time stamp. I'm sure i drop this 'Z' to import date in DK. This kind of code already exist in DK somewhere, probably in MetadataEngine code...

GilleS Caulier
Comment 5 Maik Qualmann 2018-10-24 17:24:07 UTC
Git commit d9fbed553374b5f868f3aefb2117ee9c61c999fb by Maik Qualmann.
Committed on 24/10/2018 at 17:23.
Pushed by mqualmann into branch 'master'.

Ignore the UTC flag from the video date
FIXED-IN: 6.0.0

M  +2    -1    NEWS
M  +14   -3    core/libs/metadataengine/dmetadata/dmetadata_video.cpp

https://commits.kde.org/digikam/d9fbed553374b5f868f3aefb2117ee9c61c999fb