Bug 429662 - Please, let date representation respect the format set by the Plasma Locale Time (LC_TIME environment variable) setting
Summary: Please, let date representation respect the format set by the Plasma Locale T...
Status: RESOLVED NOT A BUG
Alias: None
Product: dolphin
Classification: Applications
Component: view-engine: details mode (show other bugs)
Version: 20.08.3
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-25 22:51 UTC by Anton Latukha
Modified: 2022-09-03 22:02 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Settings -> Locale -> Detailed Settings (160.61 KB, image/png)
2020-11-25 22:51 UTC, Anton Latukha
Details
Dolphin date columns (8.16 KB, image/png)
2020-11-25 22:55 UTC, Anton Latukha
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Latukha 2020-11-25 22:51:27 UTC
Created attachment 133656 [details]
Settings -> Locale -> Detailed Settings

SUMMARY

At least for "Created, Modified, Accessed" columns it seems to not respect the `LC_TIME` environment variable.

For example, `LC_TIME=en_DK.UTF-8` is set, which corresponds to ISO 8601 date format ("YYYY-MM-DD"):
```shell
# date [OPTION]... [+FORMAT]
#   %x   locale's date representation
date +%x

2020-11-26
```
But date in the application gets represented as "DD/MM/YY". It does not make sense, since main locale setting set is `LANG=en_US.UTF-8`, so, if the application ignores `LC_TIME=en_DK.UTF-8`, it must use `LANG=en_US.UTF-8` (and the same `en_US` is in the Dolphin's "Settings -> Configure language". so US date must be "MM/DD/YY", but what gets shown is `DD/MM/YY`.

Plasma Locale settings is in the attached screenshot.

Shell results:
```shell
locale

LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=uk_UA.UTF-8
LC_TIME=en_DK.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=uk_UA.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=uk_UA.UTF-8
LC_NAME=uk_UA.UTF-8
LC_ADDRESS=uk_UA.UTF-8
LC_TELEPHONE=uk_UA.UTF-8
LC_MEASUREMENT=uk_UA.UTF-8
LC_IDENTIFICATION=uk_UA.UTF-8
LC_ALL=

localectl

   System Locale: LANG=en_US.UTF-8
                  LC_NUMERIC=uk_UA.UTF-8
                  LC_TIME=en_DK.UTF-8
                  LC_MONETARY=uk_UA.UTF-8
                  LC_PAPER=uk_UA.UTF-8
                  LC_NAME=uk_UA.UTF-8
                  LC_ADDRESS=uk_UA.UTF-8
                  LC_TELEPHONE=uk_UA.UTF-8
                  LC_MEASUREMENT=uk_UA.UTF-8
                  LC_IDENTIFICATION=uk_UA.UTF-8
       VC Keymap: us
      X11 Layout: us
       X11 Model: pc105
```


STEPS TO REPRODUCE

1. Reproduce the Locale settings form the "Settings -> Locale -> Detailed Settings" screenshot attached
2. Reload.
3. Run Dolphin.
4. Select "Details view mode"
5. Add columns "Modified" OR "Created" OR "Accessed"
6. Observe a date format.
7. Compare it to `date +%x` output.

OBSERVED RESULT

Format of date: "DD/MM/YY"

EXPECTED RESULT

Format of date: Short ISO date format (YYYY-MM-DD), or longer ISO format versions, preferably "YYYY-MM-DD HH:MM".

SOFTWARE/OS VERSIONS

Linux/KDE Plasma:
KDE Plasma Version: 5.20.3
KDE Frameworks Version: 5.76.0
Qt Version: 5.15.1
Comment 1 Anton Latukha 2020-11-25 22:55:18 UTC
Created attachment 133657 [details]
Dolphin date columns
Comment 2 spamless.9v5xj 2022-09-03 22:02:09 UTC
A (not so) fun fact: Dolphin actually does respect the locale, and en_DK time is actually *not* supposed to be in ISO-8601, being seemingly a long-time POSIX bug/mistype that was never fixed. KDE seems to use its own locale files which follows what en_DK is "supposed" to be, which is the crappy DD/MM/YYYY format.

To get KDE and by extension Dolphin to actually use ISO-8601, switch to en_SE instead.

More info:
  https://www.localeplanet.com/icu/en-DK/index.html
  https://www.localeplanet.com/icu/en-SE/index.html