Created attachment 115628 [details] original GPX file used to reproduce the bug SUMMARY STEPS TO REPRODUCE 1. Open attached .jpg file 2. Choose Item -> Edit Geolocation 3. Add attached .gpx file 4. Choose offset of +03:00 (Sofia summer time is GMT+03:00) and click Correlate 5. Change to -03:00 or any other offset OBSERVED RESULT No matter what offset is chosen (+03:00, -03:00 or _any_ other value), photo taken on 10:42 local time is assigned to position at 2018-09-30T08:39:48Z. This is completely absurd, it is not even +04:00 being selected by mistake, but some uneven number. EXPECTED RESULT I want to be able to match photo time of 10:42 to GPS point at 2018-09-30T07:42:05Z, for example by setting offset of +03:00. Currently Digikam is not a tool that will allow me to achieve this. SOFTWARE VERSIONS (available in About System) KDE Plasma Version: 5.12.6 KDE Frameworks Version: 5.44.0 Qt Version: 5.9.5 ADDITIONAL INFORMATION Checked on digikam-5.9.0-01-x86-64.appimage. Reproduces also on Digikam 5.6.0 available from Kubuntu Backports repository.
Created attachment 115629 [details] original JPG file used to reproduce the bug Please feel free to use the image to investigate the bug. Just in case someone is bothered by legal reasons, I hereby release it under CC-BY 4.0. It shows National Palace of Culture in Sofia. The bug causes it to be correlated to a park near Vasil Levski stadium, which is clearly wrong if you take a look at Google Maps.
You live in Sofia? Already tried with an offset time of 00:00:00? Explanation will be given later. Maik
I don't live in Sofia. I set my camera to Sofia local time during my travel. For GPS recording local time is not taken into account. I have just tried setting the offset to 00:00 but the correlator still chooses the wrong position, as before. I was able to set the position correctly using: exiftool -overwrite_original -geotag '*.gpx' '-geotime<${CreateDate}+03:00' . so my files are not corrupted and other tools are able to yield correct result.
And how is your time zone? Maik
UTC+02:00, Europe/Warsaw
If the time zone is set correctly in your computer, +02:00:00 should be the correct value. Here with me it is Paris/Berlin with +01:00:00. Maik
For me it is very counter-intuitive that the offset is counted relative to my current local time. Documentation (https://docs.kde.org/trunk5/en/extragear-graphics/digikam/tool-geolocation.html#geolocation-correlator) is outdated, the GUI says only 'offset', which is ambiguous. I have never seen any place where I was forced to count difference between my current local time and time zone of photos. This means I would need a different setting today and a week from now, since there is a DST change! It looks absurd to me. Anyway, I still think it's a bug that changing the value of the offset has no effect, and that the non-customizable offset used under the hood by Digikam is not in round hours. Have you tried reproducing this bug on your machine? I know for certain that it appears on mine.
The cause is we do not just compare the hours, minutes and seconds, but a QDateTime. We have a date/time after GMT / UTC by the GPS device. So this QDateTime is in UTC format. The image has a timestamp in local format. QDateTime considers the set time zone of the computer with local time stamp. Therefore in Sofia 07:49:00 UTC is the same as 10:49:00 local time. Of course, if you have a different time zone at home, the local date of the image would naturally correspond to a different UTC time, which must be corrected. Good would be theorethic, the camera stores int UTC. Practically, a SQLite database can store a date in UTC, but MySQL always stores it in the local time zone from the server. To compensate for this, you would have to enter in which time zone it was recorded, we would have to determine the current time zone, etc. Provided that the camera was set correctly. Maik
I also just see that the screenshot of the DOC no longer matches that of digiKam-6.0.0-beta2. The field for setting the time zone no longer exists. But I think that it was already changed in digiKam-5.9.0. Maik
One issue may not be clear from the original report. Photo taken on 10:42:49 local time (+03:00) is assigned to position on 2018-09-30T08:39:48Z. Assuming that application uses my machine's local time zone (+02:00) it should choose GPS point on 08:42 UTC. It chooses a track point on 08:39:48 instead, although there are 4 track points between 08:42:09 and 08:42:56. Why?
Yes, somewhere there is a mistake, although the algorithm takes the right coordinates of the point from 2018-09-30T07:42:51Z (2 seconds deviation). But adding or subtracting that with the hours does not really work out. If I set the time zone to Paris / Berlin I have to dial +1 hour, if I set your time zone I have to set 0 hours. I will take a closer look at these days and consider how best to solve them. Maik
Git commit e21b1415a71de8aedeb2d934859e5750efde592a by Maik Qualmann. Committed on 18/10/2018 at 10:43. Pushed by mqualmann into branch 'master'. add option to set the time zone of the camera of the photo shooting location FIXED-IN: 6.0.0 M +2 -1 NEWS M +22 -4 core/utilities/geolocation/editor/correlator/gpscorrelatorwidget.cpp M +4 -1 core/utilities/geolocation/editor/correlator/track_correlator.h M +6 -1 core/utilities/geolocation/editor/correlator/track_correlator_thread.cpp https://commits.kde.org/digikam/e21b1415a71de8aedeb2d934859e5750efde592a