Something was setting LC_ALL in my Ubuntu 22.04 desktop environment. Terminals were unaffected but desktop apps were apparently using the default C locale with 'US style' date formatting. There were also numerous log entries like this:
snapd-desktop-integration.snapd-desktop-integration[5623]: /bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8)
According to sources online, LC_ALL shouldn't be set. I looked for the source of the command. There was nothing in any of the scripts in my $HOME (such as .profile, .bashrc). I created a brand new user and the same issues were there when logged into their account's desktop. I looked in /etc/profile.d which contains system defaults for user profile settings.
To find out what files in the profile directory were installed by a package:
$ for file in `ls /etc/profile.d/`; do dpkg --search $file; done
base-files: /etc/profile.d/01-locale-fix.sh
snapd: /etc/profile.d/apps-bin-path.sh
bash-completion: /etc/profile.d/bash_completion.sh
language-selector-common: /etc/profile.d/cedilla-portuguese.sh
libdebuginfod-common: /usr/share/libdebuginfod-common/debuginfod.csh
libdebuginfod-common: /usr/share/libdebuginfod-common/debuginfod.sh
gnome-session-common: /etc/profile.d/gnome-session_gnomerc.sh
im-config: /etc/profile.d/im-config_wayland.sh
dpkg-query: no path found matching pattern *rust.sh*
dpkg-query: no path found matching pattern *utf8.sh*
libvte-2.91-common: /etc/profile.d/vte-2.91.sh
libvte-2.91-common: /etc/profile.d/vte.csh
gnome-session-common: /etc/profile.d/xdg_dirs_desktop_session.sh
The content of utf8.sh:
export LANG="en_US.utf8"
export LC_ALL="en_US.utf8"
export LANGUAGE="en_US"
This and rust.sh were modified at the same time. I think that they might both come from some part of installing Rust or some part of Rust.
I left rust.sh, which does not look problematic, but moved utf8.sh out of the directory. I rebooted. The removel of the file had resolved the problem.