Locale-gen not found

Hello,
I tried to set the default date format for iso8601. For this I tried to follow [1], (3rd answer, beginning with “Open locale.conf”).
However, the command “locale-gen” was not found, and I couldn’t find it in any package.
Is it substituted by localedef? Then how to use this as a substitude?

Thankes,
Johannes

[1] https://serverfault.com/questions/17118/how-do-i-set-the-date-format-to-iso-globally-in-linux

This is maybe localectl?

I think it is localedef.

https://man7.org/linux/man-pages/man1/localedef.1.html

https://man7.org/linux/man-pages/man1/localectl.1.html

In the world of Ubuntu, a tool called locale-gen reads the file /etc/locale.gen and calls localedef for the selected localization profiles.

OK, obviously OpenSuse / Tumbleweed have stopped providing locale-gen. In old tutorials and descriptions, it is many times used…
So I will have to work to get my customization done…

Thanks,
Johannes

@jke61:

But, that date format is really only available via the “date” command or, within some applications:

 > date
Mo 12. Jun 12:17:16 CEST 2023
 > date --iso-8601 
2023-06-12
 > LANG=C date
Mo 12. Jun 12:18:55 CEST 2023
 >

AFAICS, from within the system’s Locale, that date format is almost impossible to achieve …

Actually in the link [1] I provided in my original post, this should be possible quite easily. However, they describe it with the locale-gen…

I guess I will go the /etc/profile.default way…

I wanted to do it with this way, because this is a headless system with no gui and I only login via ssh.
On my desktop with KDE I login with SDDM there I have set SDDM to show ISO and I think(!!!) this causes the rest of the system, i.e. the command “dir” to follow this format.

There I could do:

`    create /etc/systemd/system/sddm.service.d/DateFormat.conf
        [Service]
        Environment=LC_TIME=C.UTF-8`

But then KDE is quite ignorant about ISO8601 time format…

Anyway, thanks
Johannes

Yes, the KDE Plasma folks seem to have limited themselves to UTF8 only …

  • I’m testing “en_SE.UTF8” as the time format in the KDE Plasma settings …

I’ll be back soon …

@jke61:

Yes that works – set the KDE Plasma Time format to “en_SE.UTF-8” –

  • The short form of the date format is then “2023-06-13” …
    Also in applications such as Dolphin …
    The Kontact PIM is however, not so flexible …

It is one of the big complaints about KDE (see the KDE forums). They lost the ability to use the ISO format for date/time.

And yes, that en_SE.UTF-8 (please mind the - sign there, UTF8 is a typo!) seems to be one of the by-passes (I use it myself, but it has side effects).

Which is why I’ve moved back to the default German date/time format … :sunglasses:

And the answers from the responsible people are sometimes quite “arrogant” (sorry), with no understanding what it is about… Well OK.

Yes, unfortunately the default German is different from the official German format (which is ISO8601, I mean the official :slight_smile: )…

@jke61:

I take it that, you mean DIN 5008:2020-03

  • The date form “dd.mm.yyyy” is an optional form for correspondence within the German borders only …

When, in LibreOffice Writer, I type “202”, Writer automatically suggests “2023-06-14” –

  • In the German LibreOffice help for “Languages (Options)” it’s mentioned that, since LibreOffice 3.5 anything numeric which doesn’t begin with the numeric characters 1 … 31 will be formatted as an ISO 8601 date format.

When, the KDE Plasma Desktop is being used within the German country borders, one could argue that optional DIN 5008:2020-03 form for correspondence within the German borders should be used …

  • Or not, maybe …

Whether or not a KDE Plasma Bug Report should be raised to address this issue is, AFAICS, a discussion point … :upside_down_face:

Hi,
what you are writing is perfectly right. The other commentators on this thread probably are also German and point to exactly this problem.
However, there were some years ago already a bug report on the KDE Bug system, and reading the answers from the responsible people really made me too shy to complain or file a bug report :-)…

Anyway, this thread started with changing the default date/time on the commandline, so a different topic and I don’t want to go too off topic…

Thanks,
Johannes

Your only option seems to be adding,

export TIME_STYLE="long-iso"
export LC_TIME="de_DE.UTF-8"

to the /etc/profile.local file.

I’ve assumed above that you are using German.

Thanks a lot,
It worked!

Thanks,
Johannes

Meaning that, not only KDE but also Linux in general should update the date format in “de_DE.UTF8” to reflect the requirements of the German Standard DIN 5008 dated March 2020 – about 3 years ago …

  • Possibly a KDE Bug Report and an openSUSE Bug Report?
    Who’s game enough to write the things?

When my memory is correct (it is already some years ago that this was a hot debated item).

KDE is blaming the tool library they use for this.

And it seems that the developers of the tool library decided what locale should have what date/time format. Often even against the standards (like DIN and NEN) of those countries. And that is it.

Apart from this, there is no possibility for individual users to have their own wish.

In earlier KDE (3.5 I think even as high as 4) you could simply set to a country and after that change the individual settings to deviate from what they thought was the setting for that country (setting like decimal separator, grouping in large number, negative numbers, currency sign and yes, date/time formats). All that is gone.