Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #267463

Re: What sets LC_TIME?

From Greg Wooledge <greg@wooledge.org>
Newsgroups linux.debian.user
Subject Re: What sets LC_TIME?
Date 2024-02-16 13:30 +0100
Message-ID <I85vP-ax4I-5@gated-at.bofh.it> (permalink)
References <I81Lz-auSx-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Feb 16, 2024 at 10:24:07AM +0200, Anssi Saari wrote:
> With the recent LC_ALL thread, I noticed I have LC_TIME set by
> mysterious means on at least two headless systems, for example:
> 
> $ locale
> LANG=en_US.UTF-8
> LANGUAGE=
> LC_CTYPE=en_US.utf8
> LC_NUMERIC=en_US.utf8
> LC_TIME=en_DK.utf8
> LC_COLLATE=en_US.utf8
> LC_MONETARY=en_US.utf8
> LC_MESSAGES=en_US.utf8
> LC_PAPER=en_US.utf8
> LC_NAME=en_US.utf8
> LC_ADDRESS=en_US.utf8
> LC_TELEPHONE=en_US.utf8
> LC_MEASUREMENT=en_US.utf8
> LC_IDENTIFICATION=en_US.utf8
> LC_ALL=

This is *extremely* abnormal locale output.  Here's mine:

unicorn:~$ locale
LANG=en_US.utf8
LANGUAGE=
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME=C
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=

Do you see what's different?  The double quotes are meaningful here.
A value that's printed in double quotes is not actually set -- it's
deduced from LANG.  In my output, the only values that are actually
set are LANG and LC_TIME.

In yours, *every* variable is set (except LANGUAGE and LC_ALL).

> LC_TIME ends up with en_DK.utf8. It's what I usually want so I've
> probably set this up and possibly I did it in the Debian installer but
> where does it come from? /etc/default/locale has just LANG=en_US.UTF-8
> 
> find /etc /home/as -type f -print0 -follow|xargs -0 grep -e LC_TIME -e en_DK
> 
> does find some matches, in /etc/locale.gen as expected and in some
> binary files but not in any relevant config file. Come to think of it,
> is this actually hidden inside the initrd somehow?

I can't imagine how the initrd would be related.

My first suspicion would be your desktop environment, if you're running
one.  Who knows what those things do.

If you login on a text console (Ctrl-Alt-F2 for example), do you still
get these same locale values?  How about "ssh localhost" (if an ssh
server is installed)?  If those differ from what you see in your desktop
environment, then it's a strong indicator the DE is doing something.

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

What sets LC_TIME? Anssi Saari <anssi.saari@debian-user.mail.kapsi.fi> - 2024-02-16 09:30 +0100
  Re: What sets LC_TIME? Greg Wooledge <greg@wooledge.org> - 2024-02-16 13:30 +0100
    Re: What sets LC_TIME? Anssi Saari <anssi.saari@debian-user.mail.kapsi.fi> - 2024-02-16 14:40 +0100
      Re: What sets LC_TIME? Greg Wooledge <greg@wooledge.org> - 2024-02-16 15:20 +0100
        Re: What sets LC_TIME? David Wright <deblis@lionunicorn.co.uk> - 2024-02-16 18:20 +0100
          Re: What sets LC_TIME? Greg Wooledge <greg@wooledge.org> - 2024-02-16 22:30 +0100
            Re: What sets LC_TIME? David Wright <deblis@lionunicorn.co.uk> - 2024-02-17 00:20 +0100
              Re: What sets LC_TIME? <tomas@tuxteam.de> - 2024-02-17 07:00 +0100
            Re: What sets LC_TIME? debian-user@howorth.org.uk - 2024-02-17 21:20 +0100
              Re: What sets LC_TIME? Greg Wooledge <greg@wooledge.org> - 2024-02-17 21:30 +0100
        Re: What sets LC_TIME? Anssi Saari <anssi.saari@debian-user.mail.kapsi.fi> - 2024-02-17 08:00 +0100

csiph-web