You are not logged in.

#1 2011-10-14 09:26:08

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Can't get the date format right.

$ locale
LANG=en_GB.UTF-8
LC_CTYPE=en_GB.UTF-8
LC_NUMERIC=en_GB.UTF-8
LC_TIME=pl_PL.UTF-8
LC_COLLATE=C
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=pl_PL.UTF-8
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=

And I still get month number before day number in dates in Thunderbird, pcmanfm and everywhere else.

Why?

Last edited by Lockheed (2011-10-14 09:28:06)

Offline

#2 2011-10-14 10:35:34

Mektub
Member
From: Lisbon /Portugal
Registered: 2008-01-02
Posts: 647

Re: Can't get the date format right.

Lockheed,

did you uncomment en_GB.UTF-8 in /etc/locale.gen and execute locale-gen ?

My locale looks like:

LANG=en_IE.utf-8
LC_CTYPE=en_IE.UTF-8
LC_NUMERIC=pt_PT.UTF-8
LC_TIME=pt_PT.UTF-8
LC_COLLATE=C
LC_MONETARY=pt_PT.UTF-8
LC_MESSAGES=en_IE.UTF-8
LC_PAPER=pt_PT.UTF-8
LC_NAME=pt_PT.UTF-8
LC_ADDRESS=pt_PT.UTF-8
LC_TELEPHONE=pt_PT.UTF-8
LC_MEASUREMENT=pt_PT.UTF-8
LC_IDENTIFICATION="en_IE.utf-8"
LC_ALL=

and date looks as it should.

Mektub


Follow me on twitter: https://twitter.com/johnbina

Offline

#3 2011-10-14 10:44:54

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: Can't get the date format right.

Yes, I did.

Offline

#4 2011-10-14 11:00:28

Mektub
Member
From: Lisbon /Portugal
Registered: 2008-01-02
Posts: 647

Re: Can't get the date format right.

Somehow your settings are not being aknowledge. I had that problem with Conky so i explicitly initialize the locale before executing it.

Try executing:

LC_ALL=en_GB.UTF-8 thunderbird

Mektub


Follow me on twitter: https://twitter.com/johnbina

Offline

#5 2011-10-14 14:03:44

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: Can't get the date format right.

This actually works, but why, oh why, doesn't it stick?

Offline

#6 2011-10-14 14:52:46

Mektub
Member
From: Lisbon /Portugal
Registered: 2008-01-02
Posts: 647

Re: Can't get the date format right.

Lockheed,

lets see: you should have

LOCALE="en_GB.UTF-8"

in /etc/rc.conf

And you should export the initializations:

export LC_CTYPE=en_GB.UTF-8
export LC_NUMERIC=en_GB.UTF-8
...

Mektub


Follow me on twitter: https://twitter.com/johnbina

Offline

#7 2011-10-14 15:02:35

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: Can't get the date format right.

1, Yes, I do have it.

2. What do you mean? Export to where? What for?

Offline

#8 2011-10-14 15:11:03

Mektub
Member
From: Lisbon /Portugal
Registered: 2008-01-02
Posts: 647

Re: Can't get the date format right.

Lockheed,

you must initialize the "LC_*" variables somewhere, most probably in your ~/.bashrc and ~/.xprofile.

In there, where you have

LC_whatever=en_GB.UTF-8

substitute with

export LC_whatever=en_GB.UTF-8

Mektub


Follow me on twitter: https://twitter.com/johnbina

Offline

#9 2011-10-14 15:13:19

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: Can't get the date format right.

Yes, I added those LC_whatever=en_GB.UTF-8 earlier today as it was one of proposed solutions, but it did not help.

They are located in /etc/profile.d/_locales.sh

# Locale
export LANG="en_GB.UTF-8"
export LC_NUMERIC="en_GB.UTF-8"
export LC_COLLATE="C"
export LC_TIME="pl_PL.UTF-8"
export LC_MONETARY="en_GB.UTF-8"
export LC_MEASUREMENT="pl_PL.UTF-8"
export LC_CTYPE="en_GB.UTF-8"
export LC_MESSAGES="en_GB.UTF-8"

As you can see, I already had this in place.

Offline

#10 2011-10-14 15:29:28

Mektub
Member
From: Lisbon /Portugal
Registered: 2008-01-02
Posts: 647

Re: Can't get the date format right.

/etc/profile.d/_locales.sh

Normally this file is called "locale.sh", but that shouldn't matter.

This should work if:

the files in /etc/profile.d are executed from /etc/profile, which they usually are if you didn't mess with it.

the file /etc/profile.d/_locales.sh is executable.

In case of doubt, put the initializations in ~/.xprofile

Mektub


Follow me on twitter: https://twitter.com/johnbina

Offline

#11 2011-10-14 15:31:27

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: Can't get the date format right.

I've done this all before posting here.

The /etc/profile is a separate file and I run this through a script in .bashrc

# Check for an interactive session
[ -z "$PS1" ] && return

alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '

if [ -n "$DISPLAY" ]; then
     BROWSER=opera -notrayicon -nomail
fi

if [ -f /etc/profile ]; then
  . /etc/profile
fi

PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin" 

Offline

#12 2011-10-14 15:35:22

Mektub
Member
From: Lisbon /Portugal
Registered: 2008-01-02
Posts: 647

Re: Can't get the date format right.

Try the ~/.xprofile suggestion.

Mektub


Follow me on twitter: https://twitter.com/johnbina

Offline

#13 2011-10-14 15:36:46

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: Can't get the date format right.

is it going to run itself or do I need to arrange it?

Offline

#14 2011-10-14 15:39:57

Mektub
Member
From: Lisbon /Portugal
Registered: 2008-01-02
Posts: 647

Re: Can't get the date format right.

It runs by itself when the X server starts.

Mektub


Follow me on twitter: https://twitter.com/johnbina

Offline

#15 2011-10-14 19:49:22

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: Can't get the date format right.

Thanks, but it did not help...

Offline

Board footer

Powered by FluxBB