On Tue, Dec 23, 2025 at 11:06:43AM +0100, Nicolas George wrote:
> David Wright (HE12025-12-23):
> > So what would be the relationshp between the system's value of LC_TZ
> > and /etc/localtime?
> 
> There is no such thing as “the system's value of” locale settings,
> locale settings are entirely local to a process.

That has always been my take, but as always, Reality (TMP) is a bit
more complicated...

There is an /etc/default/locale, which is the fallback for when no
locale values are set in the environment. This usually concerns
"system daemons" -- database server, such things.

I had to find it the hard way, when that thing was set to some
8 bit LANG (iso-8859-something) when initialising the PostgreSQL
cluster. All databases created with createdb inherited that, which
is not usually what you want. There's of course a workaround, but
the fun is in finding out what the hell went south :-)

> As for what should the system's *default* value be, I suggest: exactly
> the same thing as currently $TZ.
> 
> >                                                     (Bearing in mind
> > that we already have TZ available for overriding the default.)
> 
> Indeed. And that makes it very easy to imagine how that environment
> variable should have a slightly different name so as to be transmitted
> automatically like the rest of the locale settings.
> 
> > The Sydney example didn't help me understand much, because I don't
> > know what the ssh default behaviour is, or what you would want it
> > to be and why.
> 
> ssh's default behaviour is this:
> 
> sshd: AcceptEnv LANG LC_*
> 
> ssh:  SendEnv LANG LC_* COLORTERM NO_COLOR
> 
> Nothing more.

Exactly.

Cheers
-- 
t

Attachment: signature.asc
Description: PGP signature

Reply via email to