custom-components / places

Component to integrate with OpenStreetMap Reverse Geocode (places)
GNU General Public License v3.0
114 stars 22 forks source link

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

Open Snuffy2 opened 1 year ago

Snuffy2 commented 1 year ago

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:~#