Apparently, though unproven, at 18:33 on Friday 07 January 2011, Stroller did opine thusly:
> On 7/1/2011, at 6:26am, Alan McKinnon wrote: > >> ... > >> 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" > >> ... > >> $ date +"%l:%M%P" > >> 1:39 > >> $ LC_TIME="POSIX" > >> $ date +"%l:%M%P" > >> 1:39am > >> $ > > > > Your output looks fine, except for the last two commands. LC_TIME is an > > envvar, you have set it without exporting it, then ran data again and got > > a change. I don't understand how you managed that as LC_TIME would no > > longer be POSIX at that stage: > > > > $ cat /etc/env.d/02locale > > LANG="en_GB.utf8" > > $ locale > > LANG=en_GB.utf8 > > LC_CTYPE="en_GB.utf8" > > LC_NUMERIC="en_GB.utf8" > > LC_TIME="en_GB.utf8" > > ... > > $ date +"%l:%M%P" > > 8:16 > > $ LC_TIME="POSIX" > > $ date +"%l:%M%P" > > 8:17 > > $ LC_TIME="POSIX" date +"%l:%M%P" > > 8:18am > > I've just tested on another machine. It seems like if I set it to match the > first machine with both environments in the /etc/env.d/02locale: > > $ cat /etc/env.d/02locale > LANG="en_GB.UTF-8" > LC_TIME="POSIX" > $ sudo env-update && source /etc/profile > $ source ~/.bashrc > > Then I can reproduce switching LC_TIME without exporting or anything else: > > $ date +"%l:%M%P" > 4:01pm > $ LC_TIME="en_GB.utf8" > $ date +"%l:%M%P" > 4:02 > $ LC_TIME="POSIX" > $ date +"%l:%M%P" > 4:02pm > $ > > Removing either (& rebooting, because I don't really understand this stuff) > removes the ability. > > I don't know whether this is supposed to be correct or not; with both > environments in /etc/env.d/02locale: > > $ LC_TIME="POSIX" > $ locale > LANG=en_GB.UTF-8 > LC_CTYPE="en_GB.UTF-8" > LC_NUMERIC="en_GB.UTF-8" > LC_TIME=POSIX > 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= > $ LC_TIME="en_GB.utf8" > $ locale > LANG=en_GB.UTF-8 > LC_CTYPE="en_GB.UTF-8" > LC_NUMERIC="en_GB.UTF-8" > LC_TIME=en_GB.utf8 > 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= > $ > > The variable is lacking quotes in the `locale` output above; I have no idea > whether or not this makes any difference. > > Stroller. The effect of LC_TIME= on your machines doesn't make sense to me. What shell are you running? -- alan dot mckinnon at gmail dot com