auswaschbar / alpine-localized-docker Goto Github PK
View Code? Open in Web Editor NEWAdding locales to an alpine container in a single easy step
License: MIT License
Adding locales to an alpine container in a single easy step
License: MIT License
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.