You are not logged in.

#1 2010-08-05 17:35:18

tyr0
Member
Registered: 2007-06-02
Posts: 152

strange date format in german locale

According to /usr/share/i18n/locales/de_DE the date format for german locale is defined as follows "2000-06-24", which is not very common in German-speaking countries.Usually date is written as "24.06.2000". Some programs use this "wrong" format.
Is it save to edit the file mentioned above to achieve this format?

Last edited by tyr0 (2010-08-05 18:04:05)

Offline

#2 2010-08-05 17:43:15

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: strange date format in german locale

https://bbs.archlinux.de/

[karol@black ~]$ echo $(date "+%Y-%m-%d")
2010-08-05
[karol@black ~]$ echo $(date "+%d-%m-%Y")
05-08-2010

Last edited by karol (2010-08-05 17:45:56)

Offline

#3 2010-08-05 18:40:33

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: strange date format in german locale

I'm not sure, but what happens if you change LC_TIME to "C"? I think you can create your own locale by editing the one closest to what you need.
You can format the date  /time anyway you like, but I'm not sure whether the offending programs start to behave the way you want.

Offline

#4 2010-08-06 08:48:45

tyr0
Member
Registered: 2007-06-02
Posts: 152

Re: strange date format in german locale

Thank you, karol, formating the file didn´t force programs to use the new format. Maybe my editing isn´t correct. smile
Actually it isn´t a real problem, because in scripts you can use "date +%d.%m.%g", so I´ll mark this topic as solved.

Last edited by tyr0 (2010-08-06 08:49:43)

Offline

#5 2010-08-06 11:37:46

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: strange date format in german locale

tyr0 wrote:

Thank you, karol, formating the file didn´t force programs to use the new format. Maybe my editing isn´t correct. smile
Actually it isn´t a real problem, because in scripts you can use "date +%d.%m.%g", so I´ll mark this topic as solved.

I see that you decided against marking it as solved - or you forgot about it :-)

Which programs are showing the wrong date? They may be using their own date format and your locales are / were fine.

Offline

Board footer

Powered by FluxBB