custom date format setting code contribution
I am sorry that I do not have enough experience to push this patch directly to repository but I would like to contribute a patch krusader-2.8.0_date_display_format_Patch2.diff that implements a custom date format setting for dates displayed in PanelView file list (Modified/Changed/Accessed date).
It allows use of qt format parameters as described here: https://doc.qt.io/qt-6/qdate.html#toString-2
It was tested on Debian Bookworm and Cinnamon, with Krusader version 2.8.0 and master 2.9.0-dev (it applied to those versions without any issues).
It is possible to achieve following results with following configuration strings:
If one wants a constant width Modified date column one can use "yyyy-MM-dd hh:MM:ss" and get:
If someone needs something really strange: "'year':yyyy 'month':MM 'day':dd 'hour':hh 'min':MM 'sec':ss" :
and with empty Date Format String it defaults to locale setting/previous behavior, for example:
This patch should solve feature request described here: https://bugs.kde.org/show_bug.cgi?id=425346
Please verify if the placement of string edit box in "Konfigurator->Panel->View->General->Date Format String" is acceptable.
I have very little experience with Krusader coding conventions so please confirm if a default Date Format String was placed correctly in "defaults.h" file.
I would really love to see this patch integrated because Posix/QT locale interaction is very unclear and getting an acceptable date format is only possible for me by workarounds. For example I have a custom locale that has needed short date format but still I have to override it and use 'LC_TIME="se_SV" krusader' command to run krusader and still I can not get a date string that I want that contains seconds.