alpine-localized-docker
alpine-localized-docker copied to clipboard
difficulties encountered with en_GB locale
Hi,
I am experiencing difficulties using the en_GB locale in alpine.
I have followed the example steps in the Dockerfile in this repository and have created a small test project over at GitLab. In summary.....
My Dockerfile has the following environment variables set:
ENV LANGUAGE="en_GB.UTF-8"
ENV LC_ALL=
ENV LC_CTYPE="en_GB.UTF-8"
ENV LC_COLLATE="en_GB.UTF-8"
ENV LC_MESSAGES="en_GB.UTF-8"
ENV LC_MONETARY="en_GB.UTF-8"
ENV LC_NUMERIC="en_GB.UTF-8"
It also copies a small Python test program that displays an ISO 8601 UTC date string formatting using the OS date time locale:
import dateutil
import locale
from dateutil.parser import parse
locale.setlocale(locale.LC_TIME,'')
setdate=dateutil.parser.parse("2020-01-16T00:00:00+00:00")
print(setdate.strftime('%x'))
The expected behaviour is that the date is displayed in dd/mm/yyyy format, i.e. 16/01/2016. This works on my macOS host machine with the above variables set.
However, when I run the Python test program within the alpine-localized docker container the date format is displayed in mm/dd/yy format, i.e. 01/16/20.
How do I achieve the equivalent behaviour in alpine using alpine-localized-docker?
Kind Regards
Simon