Customizing locale settings in CentOS-4.5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



I am trying to determine how to customize the date and time display of
system utilities and user programs using the locale settings.  What I
really want is some sort of utility program that does the same thing for
CentOS as the Regions Settings Control Panel app. for MicroSoft Windows
accomplishes, but I have no hope of seeing that.

I have traced the login locale processing through /etc/profile
/etc/profile.s/*.sh and ~/.bash_profile and have decided to work backwards
from ~/.bash_profile.  What I initially wish to accomplish is to set the
date and time display (only) to iso-8601 format. I infer from what I have
read that setting LC_TIME to "i18n.UTF-8" "should" accomplish this
(presumably referring to /usr/share/i18n/locales/i18n).  But when I add
the following two lines to ~/.bash_profile I do not get any change to the
date and time  display in ls and further I get an error when I run locale
saying that the language file could not be found.

~/.bash_profile
--->

+ LC_TIME='"i18n.UTF-8"'
+ export LC_TIME

<---

After I do this and log back in then when I run locale I see this:

# locale
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_CA.UTF-8
LC_CTYPE="en_CA.UTF-8"
LC_NUMERIC="en_CA.UTF-8"
LC_TIME="i18n.UTF-8"              <---------- set as expected
LC_COLLATE="en_CA.UTF-8"
LC_MONETARY="en_CA.UTF-8"
LC_MESSAGES="en_CA.UTF-8"
LC_PAPER="en_CA.UTF-8"
LC_NAME="en_CA.UTF-8"
LC_ADDRESS="en_CA.UTF-8"
LC_TELEPHONE="en_CA.UTF-8"
LC_MEASUREMENT="en_CA.UTF-8"
LC_IDENTIFICATION="en_CA.UTF-8"
LC_ALL=
#
# ll -d D*
drwxr-xr-x  2 root root  4096 Mar 12 09:05 Desktop
# exit

Note the error message regarding LC_ALL and the failure to change the date
display.

Without those two lines in ~/.bash_profile I get this instead:

# locale
LANG=en_CA.UTF-8
LC_CTYPE="en_CA.UTF-8"
LC_NUMERIC="en_CA.UTF-8"
LC_TIME="en_CA.UTF-8"
LC_COLLATE="en_CA.UTF-8"
LC_MONETARY="en_CA.UTF-8"
LC_MESSAGES="en_CA.UTF-8"
LC_PAPER="en_CA.UTF-8"
LC_NAME="en_CA.UTF-8"
LC_ADDRESS="en_CA.UTF-8"
LC_TELEPHONE="en_CA.UTF-8"
LC_MEASUREMENT="en_CA.UTF-8"
LC_IDENTIFICATION="en_CA.UTF-8"
LC_ALL=
#
# ll -d D*
drwxr-xr-x  2 root root 4096 Mar 12 09:05 Desktop
#

The error message disappears.  Can somebody tell me a.) what is going on?
and b.) how does one customize just the date and time display using
locales?

As I am a digest subscriber, the favour of a direct copy of any reply to
the list is requested.

SIncerely,

-- 
***          E-Mail is NOT a SECURE channel          ***
James B. Byrne                mailto:ByrneJB@xxxxxxxxxxxxx
Harte & Lyne Limited          http://www.harte-lyne.ca
9 Brockley Drive              vox: +1 905 561 1241
Hamilton, Ontario             fax: +1 905 561 0757
Canada  L8E 3C3

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux