Skip to content

Locale functions not respecting System or Docker's locale #219

@Snuffy2

Description

@Snuffy2

Submitting on behalf of @gregeeh

Running HA in a docker container on an OMV NAS.

e8f6969abb562cafee456e7779e8e8dcfe0dc031
5f46ec0e239607d8eb1a9721ce277357650c51a3

2023-08-30 08:34:05.907 INFO (MainThread) [custom_components.places.sensor] (GregH) [Init] Places sensor: GregH
2023-08-30 08:34:05.907 DEBUG (MainThread) [custom_components.places.sensor] (GregH) [Init] Locale: ('en_US', 'UTF-8')
2023-08-30 08:34:05.907 DEBUG (MainThread) [custom_components.places.sensor] (GregH) [Init] Locale Date Format: %m/%d/%y
root@omv:~# locale
LANG=en_AU.UTF-8
LANGUAGE=en_AU:en
LC_CTYPE="en_AU.UTF-8"
LC_NUMERIC="en_AU.UTF-8"
LC_TIME="en_AU.UTF-8"
LC_COLLATE="en_AU.UTF-8"
LC_MONETARY="en_AU.UTF-8"
LC_MESSAGES="en_AU.UTF-8"
LC_PAPER="en_AU.UTF-8"
LC_NAME="en_AU.UTF-8"
LC_ADDRESS="en_AU.UTF-8"
LC_TELEPHONE="en_AU.UTF-8"
LC_MEASUREMENT="en_AU.UTF-8"
LC_IDENTIFICATION="en_AU.UTF-8"
LC_ALL=
root@omv:~# 
root@omv:~# 
root@omv:~# docker inspect 166931e562 | locale
LANG=en_AU.UTF-8
LANGUAGE=en_AU:en
LC_CTYPE="en_AU.UTF-8"
LC_NUMERIC="en_AU.UTF-8"
LC_TIME="en_AU.UTF-8"
LC_COLLATE="en_AU.UTF-8"
LC_MONETARY="en_AU.UTF-8"
LC_MESSAGES="en_AU.UTF-8"
LC_PAPER="en_AU.UTF-8"
LC_NAME="en_AU.UTF-8"
LC_ADDRESS="en_AU.UTF-8"
LC_TELEPHONE="en_AU.UTF-8"
LC_MEASUREMENT="en_AU.UTF-8"
LC_IDENTIFICATION="en_AU.UTF-8"
LC_ALL=
root@omv:~# 
root@omv:~# 
root@omv:~# docker ps | grep 166931e562
166931e562db   ghcr.io/home-assistant/home-assistant:stable   "/init"                  11 days ago    Up 11 days                                                                                                                                                            homeassistant
root@omv:~#

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions