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

Re: Why date command don't use my time zone ?



On Wed, Jun 28, 2006 at 12:21:51 +0200, KLEIN Stéphane wrote:
>Magnus Therning a écrit :
>>On Wed, Jun 28, 2006 at 10:27:25 +0200, KLEIN Stéphane wrote:
>>  
>>>Hello,
>>>
>>>I used tzconfig to set my time zone on Europe/Paris.
>>>
>>>I've logout/login and call date command :
>>>
>>>date
>>>Wed Jun 28 08:26:19 UTC 2006
>>>
>>>date command use UTC time zone and not Europe/Paris.
>>>
>>>How can I fix that ?
>>>    
>>
>>What's your locale set to? (I suppose LC_TIME is especially
>>interesting.)
>>
>>On my machine:
>>
>>  % locale
>>  LANG=en_GB.UTF-8
>>  LANGUAGE=en_GB:en_GB:en
>>  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
>>  Wed Jun 28 09:55:16 BST 2006
>>
>>/M
>>
>>  
>Thanks.
>
>I restart dpkg-reconfigure locales and select fr_FR.UTF-8@euro UTF-8
>default locale.
>
>But when I start % locale I've :
>
>LANG=
>LC_CTYPE="POSIX"
>LC_NUMERIC="POSIX"
>LC_TIME="POSIX"
>LC_COLLATE="POSIX"
>LC_MONETARY="POSIX"
>LC_MESSAGES="POSIX"
>LC_PAPER="POSIX"
>LC_NAME="POSIX"
>LC_ADDRESS="POSIX"
>LC_TELEPHONE="POSIX"
>LC_MEASUREMENT="POSIX"
>LC_IDENTIFICATION="POSIX"
>LC_ALL=
>
>Where can I set my default locale ?

(The following is based on my experience. I hope I'm not entirely wrong
in my understanding of how this works. :-)

If you log in on a regular terminal (i.e. not in X at all) then
/etc/environmentis used. Mine looks like this:

  LANGUAGE="en_GB:en_GB:en"
  LANG=en_GB.UTF-8

The dpkg-reconfigure you did should have affected that file. However,
I'm not sure whether it'll take effect without a reboot.

If you log in using a display manager (GDM, KDM, ...) then it might set
the locale itself (I know GDM does). AFAIK you have to log out, change
the locale, then log in again in order to change it.

/M

-- 
Magnus Therning                             (OpenPGP: 0xAB4DFBA4)
magnus@therning.org             Jabber: magnus.therning@gmail.com
http://therning.org/magnus

Software is not manufactured, it is something you write and publish.
Keep Europe free from software patents, we do not want censorship
by patent law on written works.

Hard work may not kill me, but why take the chance.

Attachment: pgphegS0mkkPz.pgp
Description: PGP signature


Reply to: