Am 07.01.2011 02:49, schrieb Stroller:
Hi there,
Can anyone else reproduce this, please, or tell me what behaviour is expected?
$ locale
LANG=en_GB.UTF-8
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME=en_GB.UTF-8
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=
$ date +"%l:%M%P"
1:39
$ LC_TIME="POSIX"
$ date +"%l:%M%P"
1:39am
$
On my host it looks the same.
It's based on the definitions in /usr/share/i18n/locales/*.
If you are asking why just have a look on the files there and search for am_pm.
Eg. for en_GB this is the decisive line:
u...@host /usr/share/i18n/locales $ grep am_pm en_GB
am_pm "";""
which means: write nothing. And for POSIX:
u...@host /usr/share/i18n/locales $ grep am_pm POSIX
am_pm "<U0041><U004D>";"<U0050><U004D>"
which represents "AM;PM" in Unicode.
I had a single line of only LANG="en_GB.UTF-8" in /etc/env.d/02locale; adding
LC_TIME="POSIX" allows various scripts and stuff (I've written) to show the date
properly, but I think I read somewhere that this is bad.
Hm, it's up to you which locales matches your needs. Maybe a more portable(in
sense of locales) timestamp format in your scripts could also be a way.
Steffen