You are not logged in.
Hi,
I am playing with Arch as I want to leave Ubuntu and its snap nonsense. I have problem with weird date format in ls -la output.
Output in Ubuntu
drwxr-xr-x 38 root root 4096 maj 18 19:57 .
drwxr-xr-x 281 root root 12288 maj 22 13:14 ..
drwxr-xr-x 14 root root 4096 maj 1 18:09 Adwaita
drwxr-xr-x 2 root root 4096 lip 31 2020 default
drwxr-xr-x 3 root root 4096 lip 31 2020 DMZ-Black
drwxr-xr-x 3 root root 4096 lip 31 2020 DMZ-White
drwxr-xr-x 3 root root 4096 maj 1 18:12 gnomeOutput in Arch
drwxr-xr-x 1 root root 66 06-08 22:58 .
drwxr-xr-x 1 root root 3906 06-09 09:01 ..
drwxr-xr-x 1 root root 222 06-08 19:50 Adwaita
drwxr-xr-x 1 root root 22 06-08 19:50 default
drwxr-xr-x 1 root root 34 06-08 22:58 gnomeLANG variables have the same values in both systems
LANG=en_US.UTF-8
LC_TIME=pl_PL.UTF-8
LC_ALL=
LANGUAGE=
Why I can't see the short name of months in Arch as in Ubuntu?
Last edited by stlab (2022-06-10 06:19:52)
Offline
Offline
alias ls='ls --color=auto'Both on Ubuntu and Arch
Offline
Did you generate the pl_PL.UTF-8 locale on Arch?
Offline
Yes, exactly as described here - https://wiki.archlinux.org/title/locale
Offline
locale
locale -a
echo $TIME_STYLEOffline
locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=pl_PL.UTF-8
LC_TIME=pl_PL.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=pl_PL.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=pl_PL.UTF-8
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT=pl_PL.UTF-8
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=locale -a
C
C.UTF-8
de_DE.utf8
en_US.utf8
pl_PL.utf8
POSIXecho $TIME_STYLEOffline
Does
LC_TIME=C ls -laget you a normal date format?
Offline
Yes,
export LC_TIME=en_US.UTF-8
ls -la
total 0
drwxr-xr-x 1 root root 66 Jun 8 22:58 .
drwxr-xr-x 1 root root 3906 Jun 9 09:01 ..
drwxr-xr-x 1 root root 222 Jun 8 19:50 Adwaita
drwxr-xr-x 1 root root 22 Jun 8 19:50 default
drwxr-xr-x 1 root root 34 Jun 8 22:58 gnomeexport LC_TIME=C
ls -la
total 0
drwxr-xr-x 1 root root 66 Jun 8 22:58 .
drwxr-xr-x 1 root root 3906 Jun 9 09:01 ..
drwxr-xr-x 1 root root 222 Jun 8 19:50 Adwaita
drwxr-xr-x 1 root root 22 Jun 8 19:50 default
drwxr-xr-x 1 root root 34 Jun 8 22:58 gnomeexport LC_TIME=de_DE.UTF-8
ls -la
total 0
drwxr-xr-x 1 root root 66 8. Jun 22:58 .
drwxr-xr-x 1 root root 3906 9. Jun 09:01 ..
drwxr-xr-x 1 root root 222 8. Jun 19:50 Adwaita
drwxr-xr-x 1 root root 22 8. Jun 19:50 default
drwxr-xr-x 1 root root 34 8. Jun 22:58 gnomeOffline
Edit: I can reproduce with pl_PL... see the following response by seth
Last edited by progandy (2022-06-09 21:39:27)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
The polish locale indeed has this format
http://translationproject.org/PO-files/ … pre1.pl.po
http://translationproject.org/PO-files/ … 1.90.pl.po
Search for "TRANSLATORS: ls output needs to be aligned for ease of reading"
"Why" the translator chose this format, I've no idea - but ubuntu might have patched this downstream.
Offline
ok, I'm guessing these lines I can blame for
#: src/ls.c:793
msgid "%b %e %H:%M"
msgstr "%m-%d %H:%M"I have made a quick test with Live CD of Fedora 36 and Debian 11 with the same results as on Arch. It seems Ubuntu has been patched.
seth, thanks a lot for the deep investigation.
The good news is that not my fault ![]()
Is it possible for me to submit the bug ticket somewhere so the maintainers of translation could explain why they have choosen such a weird format?
Offline
http://translationproject.org/team/pl.html
Mailing list or coreutils translator directly, I guess (don't know their etiquette)
Offline
addendum: in case this results in a patriotic battle over the proper time format, you can just export TIME_STYLE (check the ls manpage) to enforce a preferred format.
Offline