Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
date format issue
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
peka
l33t
l33t


Joined: 16 Mar 2005
Posts: 773
Location: Płońsk, Poland

PostPosted: Thu Nov 01, 2007 11:20 pm    Post subject: date format issue Reply with quote

for some time now my date format is changed:
Quote:
# date
Pt, 2 XI 2007, 00:18:27 CET

How do I change it back to default DD MM YYYY?
_________________
p3k4

Seize the time, Meribor. Live now; make now always the most precious time. Now will never come again...
Jean-Luc Picard, Star Trek TNG - The Inner Light
Back to top
View user's profile Send private message
hoacker
Guru
Guru


Joined: 04 Aug 2007
Posts: 505
Location: Bürstadt, Germany

PostPosted: Fri Nov 02, 2007 1:48 pm    Post subject: Re: date format issue Reply with quote

peka wrote:
How do I change it back to default DD MM YYYY?


In which environment?
KDE: Control Center -> Regional & Accessibility -> Country/Region & Language
For other environment you can try to search it's documentation....


Edit:
The setting for the desktop environment may not be what you want. Have a have a look at http://www.gentoo.org/doc/en/guide-localization.xml#doc_chap3 first.
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Sat Nov 03, 2007 1:38 am    Post subject: Reply with quote

Please post the output of locale.
Back to top
View user's profile Send private message
peka
l33t
l33t


Joined: 16 Mar 2005
Posts: 773
Location: Płońsk, Poland

PostPosted: Sat Nov 03, 2007 5:19 am    Post subject: Reply with quote

desultory wrote:
Please post the output of locale.

Code:
 $ locale
LANG=pl_PL
LC_CTYPE="pl_PL"
LC_NUMERIC="pl_PL"
LC_TIME="pl_PL"
LC_COLLATE="pl_PL"
LC_MONETARY="pl_PL"
LC_MESSAGES="pl_PL"
LC_PAPER="pl_PL"
LC_NAME="pl_PL"
LC_ADDRESS="pl_PL"
LC_TELEPHONE="pl_PL"
LC_MEASUREMENT="pl_PL"
LC_IDENTIFICATION="pl_PL"
LC_ALL=pl_PL

_________________
p3k4

Seize the time, Meribor. Live now; make now always the most precious time. Now will never come again...
Jean-Luc Picard, Star Trek TNG - The Inner Light
Back to top
View user's profile Send private message
peka
l33t
l33t


Joined: 16 Mar 2005
Posts: 773
Location: Płońsk, Poland

PostPosted: Wed Dec 19, 2007 8:51 pm    Post subject: Reply with quote

anyone?
_________________
p3k4

Seize the time, Meribor. Live now; make now always the most precious time. Now will never come again...
Jean-Luc Picard, Star Trek TNG - The Inner Light
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Thu Dec 20, 2007 9:03 am    Post subject: Reply with quote

Invoking date with LC_ALL="C" set in the environment will produce output in the default format, using English day and month names, if LC_ALL was not already set LC_TIME should have the same effect given the same value.

If you are trying to produce the date format you literally described, invoking date '+%d %m %Y' should produce the desired results, without needing to change any of the locale settings in the environment.
Back to top
View user's profile Send private message
peka
l33t
l33t


Joined: 16 Mar 2005
Posts: 773
Location: Płońsk, Poland

PostPosted: Thu Dec 20, 2007 4:06 pm    Post subject: Reply with quote

I just want my console listing to look like before (don't realy know before what)
Code:
-rw-r--r--   1 vmware users  159 Dec  1 18:20 .bashrc

and no like this:
Code:
-rw-r--r--   1 vmware users  159 XII  1 18:20 .bashrc


I have this date format in Gnome as well :(
_________________
p3k4

Seize the time, Meribor. Live now; make now always the most precious time. Now will never come again...
Jean-Luc Picard, Star Trek TNG - The Inner Light
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Fri Dec 21, 2007 10:13 am    Post subject: Reply with quote

/etc/env.d/02locale:
LANG=pl_PL
LC_CTYPE="pl_PL"
LC_NUMERIC="pl_PL"
LC_TIME="C"
LC_COLLATE="pl_PL"
LC_MONETARY="pl_PL"
LC_MESSAGES="pl_PL"
LC_PAPER="pl_PL"
LC_NAME="pl_PL"
LC_ADDRESS="pl_PL"
LC_TELEPHONE="pl_PL"
LC_MEASUREMENT="pl_PL"
LC_IDENTIFICATION="pl_PL"
LC_ALL=""
That should do it.
Back to top
View user's profile Send private message
peka
l33t
l33t


Joined: 16 Mar 2005
Posts: 773
Location: Płońsk, Poland

PostPosted: Sat Dec 29, 2007 3:07 pm    Post subject: Reply with quote

desultory wrote:
/etc/env.d/02locale:
LANG=pl_PL
LC_CTYPE="pl_PL"
LC_NUMERIC="pl_PL"
LC_TIME="C"
LC_COLLATE="pl_PL"
LC_MONETARY="pl_PL"
LC_MESSAGES="pl_PL"
LC_PAPER="pl_PL"
LC_NAME="pl_PL"
LC_ADDRESS="pl_PL"
LC_TELEPHONE="pl_PL"
LC_MEASUREMENT="pl_PL"
LC_IDENTIFICATION="pl_PL"
LC_ALL=""
That should do it.


Yes, it works. Thanks.
There's one issue though. I get month names in english not in polish like I had it before.

I have always had only LANG and LC_ALL set to pl_PL in /etc/env.d/02locale and it was OK. Now it's not.
Is it b/c LC_TIME="pl_PL" now mean that months are like I, II, III, ... X, Xi, XII ?
_________________
p3k4

Seize the time, Meribor. Live now; make now always the most precious time. Now will never come again...
Jean-Luc Picard, Star Trek TNG - The Inner Light
Back to top
View user's profile Send private message
peka
l33t
l33t


Joined: 16 Mar 2005
Posts: 773
Location: Płońsk, Poland

PostPosted: Sat Dec 29, 2007 6:28 pm    Post subject: Reply with quote

OK. Here's what I've done:

Before (see abmon):
locale -k LC_TIME:
abday="N;Pn;Wt;Śr;Cz;Pt;So"
day="niedziela;poniedziałek;wtorek;środa;czwartek;piątek;sobota"
abmon="I;II;III;IV;V;VI;VII;VIII;IX;X;XI;XII"
mon="styczeń;luty;marzec;kwiecień;maj;czerwiec;lipiec;sierpień;wrzesień;październik;listopad;grudzień"
am_pm=";"
d_t_fmt="%a, %-d %b %Y, %T"
d_fmt="%-d %b %Y"
t_fmt="%T"
t_fmt_ampm=""
era=
era_year=""
era_d_fmt=""
alt_digits=
era_d_t_fmt=""
era_t_fmt=""
time-era-num-entries=0
time-era-entries="N"
week-ndays=7
week-1stday=19971201
week-1stweek=4
first_weekday=1
first_workday=1
cal_direction=1
timezone=""
date_fmt="%a, %-d %b %Y, %T %Z"
time-codeset="UTF-8"


Edit the /usr/share/i18n/locales/pl_PL file (abmon)
Regenrate locales i.e. locale-gen
Update env i.e. update-env && source /etc/profile

After:
locale -k LC_TIME:
abday="N;Pn;Wt;Śr;Cz;Pt;So"
day="niedziela;poniedziałek;wtorek;środa;czwartek;piątek;sobota"
abmon="sty;lut;mar;kwi;maj;cze;lip;sie;wrz;paĹş;lis;gru"
mon="styczeń;luty;marzec;kwiecień;maj;czerwiec;lipiec;sierpień;wrzesień;październik;listopad;grudzień"
am_pm=";"
d_t_fmt="%a, %-d %b %Y, %T"
d_fmt="%-d %b %Y"
t_fmt="%T"
t_fmt_ampm=""
era=
era_year=""
era_d_fmt=""
alt_digits=
era_d_t_fmt=""
era_t_fmt=""
time-era-num-entries=0
time-era-entries="N"
week-ndays=7
week-1stday=19971201
week-1stweek=4
first_weekday=1
first_workday=1
cal_direction=1
timezone=""
date_fmt="%a, %-d %b %Y, %T %Z"
time-codeset="UTF-8"


Directory listing:
Before:
genio / # la
razem 481K
drwxr-xr-x  21 root root  4,0K XI 23  2006 .
drwxr-xr-x  21 root root  4,0K XI 23  2006 ..
-rw-------   1 root root  2,2K III 16  2006 .bash_history
drwxr-xr-x   2 root root  4,0K XII 21 20:49 bin
drwxr-xr-x   4 root root  1,0K XII 19 21:13 boot
drwxrwxr-x  11 root users 4,0K VII 11 21:52 Dane
drwxr-xr-x  14 root root  3,4K XII 29 17:34 dev
drwxr-xr-x  77 root root  4,0K XII 29 19:18 etc
drwxr-xr-x   5 root root  4,0K II 10  2007 home
drwxr-xr-x  11 root root  4,0K XII 29 10:06 lib
drwx------   2 root root   16K III 13  2006 lost+found
drwxr-xr-x   2 root root  4,0K XII 29 17:33 media
drwxr-xr-x   6 root root  4,0K I  3  2007 mnt
drwxr-xr-x  13 root root  4,0K X  6 11:23 opt
dr-xr-xr-x 105 root root     0 XII 29 18:33 proc
drwx------  37 root root  4,0K XII 29 19:16 root
drwxr-xr-x   2 root root  4,0K XII 21 20:49 sbin
drwxr-xr-x  10 root root     0 XII 29 18:33 sys
drwxrwxrwt 568 root root  396K XII 29 19:17 tmp
drwxr-xr-x  19 root root  4,0K VIII 26 08:37 usr
drwxr-xr-x  14 root root  4,0K VII 14 13:31 var
drwxrwxr-x   5 root users 4,0K V  5  2007 Wine


After:
genio / # la
razem 481K
drwxr-xr-x  21 root root  4,0K lis 23  2006 .
drwxr-xr-x  21 root root  4,0K lis 23  2006 ..
-rw-------   1 root root  2,2K mar 16  2006 .bash_history
drwxr-xr-x   2 root root  4,0K gru 21 20:49 bin
drwxr-xr-x   4 root root  1,0K gru 19 21:13 boot
drwxrwxr-x  11 root users 4,0K lip 11 21:52 Dane
drwxr-xr-x  14 root root  3,4K gru 29 17:34 dev
drwxr-xr-x  77 root root  4,0K gru 29 19:19 etc
drwxr-xr-x   5 root root  4,0K lut 10  2007 home
drwxr-xr-x  11 root root  4,0K gru 29 10:06 lib
drwx------   2 root root   16K mar 13  2006 lost+found
drwxr-xr-x   2 root root  4,0K gru 29 17:33 media
drwxr-xr-x   6 root root  4,0K sty  3  2007 mnt
drwxr-xr-x  13 root root  4,0K paĹş  6 11:23 opt
dr-xr-xr-x 105 root root     0 gru 29 18:33 proc
drwx------  37 root root  4,0K gru 29 19:16 root
drwxr-xr-x   2 root root  4,0K gru 21 20:49 sbin
drwxr-xr-x  10 root root     0 gru 29 18:33 sys
drwxrwxrwt 568 root root  396K gru 29 19:17 tmp
drwxr-xr-x  19 root root  4,0K sie 26 08:37 usr
drwxr-xr-x  14 root root  4,0K lip 14 13:31 var
drwxrwxr-x   5 root users 4,0K maj  5  2007 Wine


This is a dirty workaround but what else I can do?
_________________
p3k4

Seize the time, Meribor. Live now; make now always the most precious time. Now will never come again...
Jean-Luc Picard, Star Trek TNG - The Inner Light
Back to top
View user's profile Send private message
djinnZ
Advocate
Advocate


Joined: 02 Nov 2006
Posts: 4831
Location: somewhere in L.O.S.

PostPosted: Sat Dec 29, 2007 7:59 pm    Post subject: Reply with quote

edit /etc/locales.conf
_________________
scita et risus abundant in ore stultorum sed etiam semper severi insani sunt:wink:
mala tempora currunt...mater stultorum semper pregna est :evil:
Murpy'sLaw:If anything can go wrong, it will - O'Toole's Corollary:Murphy was an optimist :wink:
Back to top
View user's profile Send private message
peka
l33t
l33t


Joined: 16 Mar 2005
Posts: 773
Location: Płońsk, Poland

PostPosted: Sat Dec 29, 2007 8:14 pm    Post subject: Reply with quote

djinnZ wrote:
edit /etc/locales.conf

I don't have this file
_________________
p3k4

Seize the time, Meribor. Live now; make now always the most precious time. Now will never come again...
Jean-Luc Picard, Star Trek TNG - The Inner Light
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum