Setting locale inside system container

I don’t seem to be able to set my locale inside an incus container running Debian trixie. Have tried the usual things for Debian:

dpkg-reconfigure locales
update-locale LANG=“en_GB.UTF-8” LANGUAGE=“en_GB”
export LANG=“en_GB.UTF-8”; export LANGUAGE=“en_GB”

When I type locale I get something that looks right:
root@mail:/etc# locale
LANG=en_GB.UTF-8
LANGUAGE=en_GB
LC_CTYPE=“en_GB.UTF-8”
LC_NUMERIC=“en_GB.UTF-8”
LC_TIME=“en_GB.UTF-8”
LC_COLLATE=“en_GB.UTF-8”
LC_MONETARY=“en_GB.UTF-8”
LC_MESSAGES=“en_GB.UTF-8”
LC_PAPER=“en_GB.UTF-8”
LC_NAME=“en_GB.UTF-8”
LC_ADDRESS=“en_GB.UTF-8”
LC_TELEPHONE=“en_GB.UTF-8”
LC_MEASUREMENT=“en_GB.UTF-8”
LC_IDENTIFICATION=“en_GB.UTF-8”
LC_ALL=

But when I ask for the date it has the original locale:
root@mail:/etc# date
Fri 1 Aug 07:42:27 UTC 2025

Have restarted the container but this didn’t change anything.
Any ideas?

Thanks,
Graham.

Maybe try setting the timezone like this:

timedatectl set-timezone "Europe/London"

Or maybe you’re missing the language-pack-en package inside the container (on Debian it can have a different name).

1 Like

Your time zone is utc. Try this to change time zone:
pkg-reconfigure tzdata

And you can use this to print date in another locale:
LANG=“(change this to another locale).UTF-8” date

1 Like

Awesome, thank you both. For some reason I had it in mind that locale covered the time zone. Both these fixes worked for me.
Best,
G.

LC_TIME is the locale variable to control the formatting of the time, not the timezone. Most commonly, the formatting of the time is whether it will be 13:50 or 01:30pm. The locale does not specify a timezone, since you may select to use a specific locale even if you are located in some different timezone.

The traditional way to set the timezone is to do something like this,

sudo ln -s /usr/share/zoneinfo/Europe/London /etc/localtime
1 Like