[SOLVED] Dolphin (KDE 5): Get ISO 8601 compliant date & time shown for files & folders.
Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Dolphin (KDE 5): Get ISO 8601 compliant date & time shown for files & folders.
affected software: Dolphin 21.12.1; KDE 5.23.5 (parts of Slackware64 15.0)
"Time" is set to en_SE in "KDE control center" because this setting provides ISO 8601 compliant date & time format "YYYY-MM-DD HH:MM (24 hrs)". All other settings are set to en_DE due to my localisation and preferred language for computing.
Unfortunately, Dolphin ignores this "time" setting and shows date & time in this annoying "mM/dD/YY hH:MM (12 hrs)" format.
Example:
ISO 8601: 2023-05-08 15:37
Dolphin: 5/8/23 3:37 PM
How can I set Dolphin to use ISO 8601 compliant date & time?
Done & works, but I'm using Midnight Commander (mc) in console (pure console & terminal windows on GUI) context only. mc is not an option as Dolphin replacement for me.
Going the rocky road gives a partial solution. I've created an en_DE locale with ISO 8601 compliant date & time format¹. This works on pure console & terminal windows on GUI. It removes this annoying "mM/dD/YY hH:MM (12 hrs)" format from Dolphin, but current format in Dolphin doesn't change to "YYYY-MM-DD HH:MM:SS (24 hrs)". It changes to "DD/MM/YYYY HH:MM (24 hrs)" format instead. This is quite better than "mM/dD/YY hH:MM (12 hrs)" format but not optimal.
¹Installation of en_DE with ISO 8601 compliant date & time, installation description for Slackware64 15.0:
download so that the locale file is accessible as /usr/share/i18n/locales/en_DE
become root
run: localedef --no-archive -f UTF-8 -i en_DE en_DE.utf8
command above creates /usr/lib64/locale/en_DE.utf-8 with content
set your system or account default locale to en_DE.utf-8, for system locale: edit /etc/profile.d/lang.sh and lang.csh
reboot, or log off and back on, to activate the new locale
en_DE
Code:
comment_char %
escape_char /
% Current state: This file is NOT part of the GNU C Library and contains locale data.
% The Free Software Foundation does not claim any copyright interest
% in the locale data contained in this file. The foregoing does not
% affect the license of the GNU C Library as a whole. It does not
% exempt you from the conditions of the license if your use would
% otherwise be governed by that license.
% Locale for English locale in Germany with ISO 8601 compliant date & time
% de_DE Contributed by Ulrich Drepper <drepper@redhat.com>, 2000
% en_DE Contributed by Soenke Kraft <soenke.kraft@sackpfeyffer-zu-linden.de>, 2023
LC_IDENTIFICATION
title "English locale for Germany"
source "derived from de_DE from Free Software Foundation, Inc."
address ""
contact ""
email ""
tel ""
fax ""
language "English"
territory "Germany"
revision "1.0"
date "2023-06-24"
category "i18n:2012";LC_IDENTIFICATION
category "i18n:2012";LC_CTYPE
category "i18n:2012";LC_COLLATE
category "i18n:2012";LC_TIME
category "i18n:2012";LC_NUMERIC
category "i18n:2012";LC_MONETARY
category "i18n:2012";LC_MESSAGES
category "i18n:2012";LC_PAPER
category "i18n:2012";LC_NAME
category "i18n:2012";LC_ADDRESS
category "i18n:2012";LC_TELEPHONE
category "i18n:2012";LC_MEASUREMENT
END LC_IDENTIFICATION
LC_CTYPE
copy "i18n"
translit_start
include "translit_combining";""
% German umlauts.
% LATIN CAPITAL LETTER A WITH DIAERESIS.
<U00C4> "A<U0308>";"AE"
% LATIN CAPITAL LETTER O WITH DIAERESIS.
<U00D6> "O<U0308>";"OE"
% LATIN CAPITAL LETTER U WITH DIAERESIS.
<U00DC> "U<U0308>";"UE"
% LATIN SMALL LETTER A WITH DIAERESIS.
<U00E4> "a<U0308>";"ae"
% LATIN SMALL LETTER O WITH DIAERESIS.
<U00F6> "o<U0308>";"oe"
% LATIN SMALL LETTER U WITH DIAERESIS.
<U00FC> "u<U0308>";"ue"
% Danish.
% LATIN CAPITAL LETTER A WITH RING ABOVE.
<U00C5> "A<U030A>";"AA"
% LATIN SMALL LETTER A WITH RING ABOVE.
<U00E5> "a<U030A>";"aa"
% The following strange first-level transliteration derive from the use
% U201E and U201C as "correct" quoting characters. These two characters
% do not really belong together. The result is that somebody who uses
% U201C and U201D will get the incorrect U00AB / U00BB sequences.
% LEFT DOUBLE QUOTATION MARK
<U201C> <U00AB>;<U0022>
% RIGHT DOUBLE QUOTATION MARK
<U201D> <U00BB>;<U0022>
% DOUBLE LOW-9 QUOTATION MARK
<U201E> <U00BB>;"<U002C><U002C>"
% DOUBLE HIGH-REVERSED-9 QUOTATION MARK
<U201F> <U00AB>;<U0022>
translit_end
END LC_CTYPE
LC_COLLATE
% Copy the template from ISO/IEC 14651
copy "iso14651_t1"
END LC_COLLATE
LC_MONETARY
int_curr_symbol "EUR "
currency_symbol "<U20AC>"
mon_decimal_point ","
mon_thousands_sep "."
mon_grouping 3;3
positive_sign ""
negative_sign "-"
int_frac_digits 2
frac_digits 2
p_cs_precedes 0
p_sep_by_space 1
n_cs_precedes 0
n_sep_by_space 1
p_sign_posn 1
n_sign_posn 1
%
END LC_MONETARY
LC_NUMERIC
decimal_point ","
thousands_sep "."
grouping 3;3
END LC_NUMERIC
LC_TIME
abday "Sun";"Mon";"Tue";"Wed";"Thu";"Fri";"Sat"
day "Sunday";/
"Monday";/
"Tuesday";/
"Wednesday";/
"Thursday";/
"Friday";/
"Saturday"
abmon "Jan";"Feb";/
"Mar";"Apr";/
"May";"Jun";/
"Jul";"Aug";/
"Sep";"Oct";/
"Nov";"Dec"
mon "January";/
"February";/
"March";/
"April";/
"May";/
"June";/
"July";/
"August";/
"September";/
"October";/
"November";/
"December"
% date formats following ISO 8601-1988
d_t_fmt "%Y-%m-%dT%T %Z"
date_fmt "%Y-%m-%dT%T %Z"
d_fmt "%Y-%m-%d"
t_fmt "%T"
am_pm "";""
t_fmt_ampm ""
week 7;19971130;4
first_weekday 2
END LC_TIME
LC_MESSAGES
yesexpr "^[+1jJyY]"
noexpr "^[-0nN]"
yesstr "yes"
nostr "no"
END LC_MESSAGES
LC_PAPER
copy "i18n"
END LC_PAPER
LC_NAME
name_fmt "%d%t%g%t%m%t%f"
name_miss "Miss"
name_mr "Mister"
name_mrs "Miss"
name_ms "Miss"
END LC_NAME
LC_ADDRESS
postal_fmt "%f%N%a%N%d%N%b%N%s %h %e %r%N%z %T%N%c%N"
country_name "Germany"
country_post "D"
country_ab2 "DE"
country_ab3 "DEU"
country_num 276
country_car "D"
country_isbn 3
lang_name "German"
lang_ab "de"
lang_term "deu"
lang_lib "ger"
END LC_ADDRESS
LC_TELEPHONE
tel_int_fmt "+%c %a %l"
tel_dom_fmt "%A %l"
int_select "00"
int_prefix "49"
END LC_TELEPHONE
LC_MEASUREMENT
copy "i18n"
END LC_MEASUREMENT
I know, and it is what I stated to you in my previous post. I was merely pointing you at similar discussions.
Quote:
Done & works, but I'm using Midnight Commander (mc) in console (pure console & terminal windows on GUI) context only. mc is not an option as Dolphin replacement for me.
Midnight Commander was just an example, (and it is popular amongst those using non-GUI environments). You surely can research alternatives which provide the capability that you require?
WFM. Admittedly, my Plasma is not the freshest one - 5.12, but dolphin reacts to setting LC_TIME as expected, including en_SE Attachment 41243
Yes, not something I had tried (or ever required), but as it was also mentioned in the superuser answers, I set en_SE via System Settings, and indeed time stamps doe display in Dolphin as required.
command above creates /usr/lib64/locale/en_SE.utf-8 with content
edit /etc/profile.d/lang.sh: entry LC_COLLATE=C can be left unchanged, values of all other LC_ entries must be changed to en_SE.utf-8
edit /etc/profile.d/lang.csh: entry LC_COLLATE C can be left unchanged, values of all other LC_ entries must be changed to en_SE.utf-8 *** not tested whether this step is required or only recommended for unification ***
reboot & start KDE 5
go to [KDE] "System Settings" → "Regional Settings" → "Formats"
Activate "Detailed Settings"
Set "Time" to "Sweden - English (en_SE)"
Set all other settings to desired English language based values *** only tested with "Germany - English (en_DE)" ***
This solution looks like that KDE 5 must believe at startup that the computer is located in Sweden and not e.g. in Germany to show date & time format "YYYY-MM-DD HH-MM (24 hrs)" in Dolphin.
This solution looks like that KDE 5 must believe at startup that the computer is located in Sweden and not e.g. in Germany to show date & time format "YYYY-MM-DD HH-MM (24 hrs)" in Dolphin.
As per lvm's comments, that what worked for me. This reads the same.
For the rest of KDE, the old solution to have the time iso format:
yyyy-mm-dd
and the 24-hour clock keeps working, and it is as follows.
(click on the kde menu)
> settings
> system settings
> regional settings
> region & language
> (on the right-most side of the "time" line, click) modify
> (search for sweden)
> (click on) english (sweden)
> (close the system settings application)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.