Created attachment 173526 [details] Import view preview file name SUMMARY The fractional / sub seconds value of an image is not being read or applied to the filename. For example, with a format code of [date:"yyyy-MM-dd hh-mm-ss.zzz"], the zzz part is always 000 when displayed in the "New name" column and when applying the rename operation. Note however, when in Import view, the fractional seconds element is correctly displayed in the example output field when selecting an image, but when applying the format, the value also goes to 000. STEPS TO REPRODUCE - Renamer View 1. Select image 2. Press F2 / Rename 3. Enter [date:"yyyy-MM-dd hh-mm-ss.zzz"] into format / name field OBSERVED RESULT - Renamer View All image names in "New Name" column are 000 where zzz format specifier is used. EXPECTED RESULT - Renamer View The fractional seconds value is displayed and applied correctly. ----- STEPS TO REPRODUCE - Import View 1. Import from a device 2. In the File Renaming Options section, enable Customise and set the field to [date:"yyyy-MM-dd hh-mm-ss.zzz"] 3. Click on any of the images and observe the previewed name in the File Renaming Options. OBSERVED RESULT - Import View Preview file name is correct with the zzz section showing fractional seconds, but the actual import and rename process results in 000 for the zzz section of the file name. EXPECTED RESULT - Import View Both previewed file name and actual file name match, and both have fractional seconds correctly read from the file. SOFTWARE/OS VERSIONS Windows 10 22H2 19045.4529 digiKam Build date: 2024-09-04 13:02 (target: RelWithDebInfo) Revision: 933e4d03eddd94118a8dd16b134f571342bc9bc0 Branch: master ADDITIONAL INFORMATION Mentioned in https://bugs.kde.org/show_bug.cgi?id=492007#c7
Created attachment 173527 [details] Rename view file name preview
This is not a bug, only if a fractional second is present in the date in the DB, it can be adopted. The date usually comes from the original date in the metadata, but this rarely has a fractional second. Maik
Thanks Maik. Okay, I can see your point of view for the renamer view but the import section seems like a bug: "Note however, when in Import view, the fractional seconds element is correctly displayed in the example output field when selecting an image, but when applying the format, the value also goes to 000."
https://bugsfiles.kde.org/attachment.cgi?id=173526
Please upload the image for testing. Maik
Created attachment 173530 [details] Test image https://1drv.ms/i/s!Ajr10IwsuvM9hNRmCdaMu-Iz1qxl4Q?e=oKLhNj
Comment on attachment 173530 [details] Test image https://1drv.ms/i/s!Ajr10IwsuvM9hNRmCdaMu-Iz1qxl4Q?e=oKLhNj
Comment on attachment 173530 [details] Test image >https://1drv.ms/i/s!Ajr10IwsuvM9hNRmCdaMu-Iz1qxl4Q?e=oKLhNj
Comment on attachment 173530 [details] Test image <img src="https://1drv.ms/i/s!Ajr10IwsuvM9hNRmCdaMu-Iz1qxl4Q?e=oKLhNj">
Comment on attachment 173530 [details] Test image <!DOCTYPE html> <html> <head> <title>Test image</title> </head> <body> <a href="https://1drv.ms/i/s!Ajr10IwsuvM9hNRmCdaMu-Iz1qxl4Q?e=oKLhNj">https://1drv.ms/i/s!Ajr10IwsuvM9hNRmCdaMu-Iz1qxl4Q?e=oKLhNj</a> </body> </html>
Oh no. What a mess. I didn't realise editing an attachment created a new comment each time... File is too large for upload. Link to file: https://1drv.ms/i/s!Ajr10IwsuvM9hNRmCdaMu-Iz1qxl4Q?e=oKLhNj
Git commit 5ff55ff03218bfc2d119e5251520cd68b40d220d by Maik Qualmann. Committed on 10/09/2024 at 18:11. Pushed by mqualmann into branch 'master'. add support for fractional second when importing metadata M +1 -1 NEWS M +4 -0 core/utilities/import/main/importui.cpp https://invent.kde.org/graphics/digikam/-/commit/5ff55ff03218bfc2d119e5251520cd68b40d220d
The general adoption of the fractional second into the database would not be a problem with SQLite. However, our MySQL database schema does not currently support time specifications with fractional seconds. This would require a major update for a MySQL database, so we will postpone this to a later digiKam version. Maik
(In reply to Maik Qualmann from comment #14) > The general adoption of the fractional second into the database would not be > a problem with SQLite. However, our MySQL database schema does not currently > support time specifications with fractional seconds. This would require a > major update for a MySQL database, so we will postpone this to a later > digiKam version. > > Maik Thanks Maik. I'll give this a try when the weekly build is ready.
Just tried the nightly build and it's now including the fractional data. Thanks! However, the value shown in the preview doesn't match what is actually being used as the file name for some reason. This is on the import view. The following image shows 2024-09-17 20-49-53.160.JPG as the filename preview with the renaming option set to [date:"yyyy-MM-dd hh-mm-ss.zzz"], but when I import the file, it names it to 2024-09-17 20-49-52.449.JPG Image: https://1drv.ms/i/s!Ajr10IwsuvM9hNUU-qDlR0n_8tpNXw?e=dbzJ93
The date view in the import tool can only be an approximate preview. It depends on the settings in the digiKam camera setup whether file metadata is read (makes the connection slower). Otherwise the date used comes from the file date. Maik