NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
INaturalist reports missing date, because the date field is incorrectly formatted. Digikam provides date and time, iNaturalist only wants date.
STEPS TO REPRODUCE
1. Select images
2. Choose iNaturalist from the export menu.
3. Examine thee try that has been created on iNaturalist website
INaturalist reports ‘missing date’, but when the entry is edited the date observed field contains the correct date.
Date is accepted by iNaturalist
(available in About System)
KDE Plasma Version:
KDE Frameworks Version:
2022-04-14T08:56:52 GMT Summer Time
Thank you for your report.
I have followed your steps to reproduce the issue. I have uploaded 3 images that I took yesterday and created an iNaturalist observation. This is the result: https://www.inaturalist.org/observations/111590956 "Missing date" is not reported and under "Observed:" the date, time, and my timezone are correctly shown. The date and time shown on the iNat website exactly matches the date and time of the first photo in DigiKam.
My guess is that your timezone "GMT Summer Time" is not accepted by iNaturalist. The export plugin obtains it with QDateTime.timeZoneAbbreviation() from the first observation photo. That looks like an awfully long name for a timezone abbreviation and it is imaginable that the iNat API doesn't parse and process it correctly. Would you mind trying other names for your timezone?
Gilles certainly knows class QDateTime better than me. Maybe he has a suggestion for an improvement. We definitely do not want to send only the date.
I don't know if QDateTime as extra capabilities with time zone (perhaps in Qt6).
Any way, in digiKam core, we have used QLocale method to make special time transformations.
Else, of course, take a look to QTimeZone :
Created attachment 148191 [details]
How do I change the timezone in digikam?
On Sat, 16 Apr 2022 at 17:59, <firstname.lastname@example.org> wrote:
> email@example.com changed:
> What |Removed |Added
> Resolution|DOWNSTREAM |---
> Status|NEEDSINFO |REOPENED
> Ever confirmed|0 |1
> --- Comment #3 from firstname.lastname@example.org ---
> I don't know if QDateTime as extra capabilities with time zone (perhaps in
> Any way, in digiKam core, we have used QLocale method to make special time
> Else, of course, take a look to QTimeZone :
> You are receiving this mail because:
> You reported the bug.
Steve asks a good question. We are dealing with the timezone of a picture, not the system timezone.
Gilles, is there an editor in DigiKam where one can edit the date and time and timezone of a picture?
Where does the timezone of a picture come from? Will a picture that I took in February have a different timezone than a picture that I took yesterday? If would think so. So the timezone of a picture is constructed when DigiKam loads metadata of a picture? If so, DigiKam gives the picture timezone "GMT SUmmer Time".
The date of an image, if available, comes from the image metadata, usually OriginalTime. DigiKam ignores the time zone. On the one hand, the cause is that cameras have not previously saved the time zone in the image metadata. Newer cameras use a fairly new metadata tag to store the time zone.
But if I see it correctly in the code, only the date is transmitted if there are no other places in the code.
The actual code is https://invent.kde.org/graphics/digikam/-/blob/master/core/dplugins/generic/webservices/inaturalist/inatwindow.cpp#L803 where the observation date and time is sent as "observed_on_string" to iNaturalist. This string is constructed in lines 799 to 801 where for Steve "GMT Summer Time" gets appended to the ISO date and time representation.
it seems the daylight savings time variant of GMT is called BST. Can you change your timezone to BST? That will be system-wide change of your computer's timezone not just a setting in DigiKam, if I understand correctly. You may need to reboot after that change. In DigiKam maybe under "Album" better click "Reread Metadata from Files" before you upload photos to iNaturalist again.
I came across BST here: https://stackoverflow.com/questions/16086962/how-to-get-a-time-zone-from-a-location-using-latitude-and-longitude-coordinates
That's info on querying the timezone based on date/time as well as latitude and longitude. That functionality would allow all photos with latitude/longitude in their metadata get correct timezones assigned. Maybe that's something to consider for Gilles and Maik.
The QDateTime::toString(Qt::ISODate) function already appends a time zone extension if it exists. In the code, however, a time zone is appended again, that should be the problem.
Thanks for expaining, Maik!
I will send a fix later today.
Steve, if you are running on Linux, the following command runs DigiKam with timezone name BST instead:
Merge request #173 has been created for the fix.
Do not close this file until MR is not pushed in master :
Also, patch must be applied to qt5-maintenance branch for 7.7.0 release
Created attachment 148219 [details]
Metadata and GPX
I'm using Windows at present. The time zone is shown as (UTC+00) Dublin, Edinburgh, Lisbon, London. Daylight Saving Time is on. i.e. BST is GMT+1.
I can't see any reference to Time Zone in either image metadata, or GPX files (from my Garmin GPS Etrex E22x). The metadata appears to only show date and time, the GPS converts times to Zulu (GMT) before exporting the GPX files.
INaturalist seems to only be interested in the date, does that make Timezone irrelevant? The data for my observations https://www.inaturalist.org/observations/111507740 and https://www.inaturalist.org/observations/111909844 don't show times.
iNaturalist does show the time that the observation was made as Apr 18, 2022 · 12:29 BST.
Hope that this helps
(In reply to joergmlpts from comment #5)
> Steve asks a good question. We are dealing with the timezone of a picture,
> not the system timezone.
> Gilles, is there an editor in DigiKam where one can edit the date and time
> and timezone of a picture?
> Where does the timezone of a picture come from? Will a picture that I took
> in February have a different timezone than a picture that I took yesterday?
> If would think so. So the timezone of a picture is constructed when DigiKam
> loads metadata of a picture? If so, DigiKam gives the picture timezone "GMT
> SUmmer Time".
When I look at my pictures the only difference between GMT and BST is that the latter shows UTC +1:00 if I remember to correctly set daylight saving time on my cameras.
(In reply to Steve Franks from comment #14)
> Created attachment 148219 [details]
> Metadata and GPX
> I'm using Windows at present. The time zone is shown as (UTC+00) Dublin,
> Edinburgh, Lisbon, London. Daylight Saving Time is on. i.e. BST is GMT+1.
> I can't see any reference to Time Zone in either image metadata, or GPX
> files (from my Garmin GPS Etrex E22x). The metadata appears to only show
> date and time, the GPS converts times to Zulu (GMT) before exporting the GPX
> INaturalist seems to only be interested in the date, does that make Timezone
> irrelevant? The data for my observations
> https://www.inaturalist.org/observations/111507740 and
> https://www.inaturalist.org/observations/111909844 don't show times.
> iNaturalist does show the time that the observation was made as Apr 18, 2022
> · 12:29 BST.
> Hope that this helps
I have just noticed that some older observations do have times see:- https://www.inaturalist.org/observations?place_id=any&user_id=serendipterist&verifiable=any
None of the times are shown as BST, some are GMT some UTC
Git commit a254cd10b48a3bdef2424fa2d7d4cee17bad0432 by Maik Qualmann.
Committed on 23/04/2022 at 11:03.
Pushed by mqualmann into branch 'qt5-maintenance'.
Pass observation time in correct format from Joerg Lohse
M +1 -3 core/dplugins/generic/webservices/inaturalist/inatwindow.cpp