You are not logged in.

#1 2012-09-01 23:57:32

hozza
Member
From: UK
Registered: 2012-07-06
Posts: 24

[SOLVED] Locale LC_TIME Config

When installing a new Arch box. I noticed that on the Wiki the only way to change the Locale config LC_TIME to the standard YYYY-MM-DD format is to use DK (Denmark) option.

I'm GB but prefer YYYY-MM-DD as it eliminates confusion between early-in-the-year months between US and GB people/software.

Am I wrong to use YYYY-MM-DD as im in the GB and is DK the only place that uses it officially?

Any info on the matter would be highly appreciated.

https://wiki.archlinux.org/index.php/Lo … ide_locale

# Set the short date to YYYY-MM-DD (test with "date +%c")
LC_TIME="en_DK.UTF-8"

Last edited by hozza (2012-09-05 14:18:03)

Offline

#2 2012-09-02 02:04:13

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,152

Re: [SOLVED] Locale LC_TIME Config

Isn't that just an example? I was trying to figure out which others did it but just realised I've searched for revision dates rather than date formats...

Does that example work? According to the man page for date "date +%c" isn't for the short form of the date at all...

EDIT: Why would you be wrong to use your preferred date format? Unless you are using that on legal/official documents... I think that might be problematic, though I'm not sure.

Last edited by cfr (2012-09-02 02:24:13)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#3 2012-09-02 08:03:17

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [SOLVED] Locale LC_TIME Config

# nano /etc/locale.gen
en_GB.UTF-8 UTF-8
en_DK.UTF-8 UTF-8
# locale-gen
# nano /etc/locale.conf
LANG=en_GB.UTF-8
LC_TIME=en_DK.UTF-8

Done.

hozza wrote:

I'm GB but prefer YYYY-MM-DD as it eliminates confusion between early-in-the-year months between US and GB people/software.

Personally I prefer dd/mm/yyyy, because I not Arab, I read from left to right. Having the year in front of the date is too intrusive for my eyes (being constantly reminded what year it is). Don't worry, software will not display the date in any strange way if you have the appropriate locale set.

Last edited by DSpider (2012-09-02 08:06:17)


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#4 2012-09-02 13:50:47

hozza
Member
From: UK
Registered: 2012-07-06
Posts: 24

Re: [SOLVED] Locale LC_TIME Config

DSpider wrote:
# nano /etc/locale.gen
en_GB.UTF-8 UTF-8
en_DK.UTF-8 UTF-8
# locale-gen
# nano /etc/locale.conf
LANG=en_GB.UTF-8
LC_TIME=en_DK.UTF-8

Done.

Yup, thats what I did. Just wondering if there was a better way (a more universal local, if you see what I mean) rather than just using Denmark's Locale?

Last edited by hozza (2012-09-04 13:41:02)

Offline

#5 2012-09-04 13:41:10

hozza
Member
From: UK
Registered: 2012-07-06
Posts: 24

Re: [SOLVED] Locale LC_TIME Config

Bump big_smile

Offline

#6 2012-09-05 09:43:17

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [SOLVED] Locale LC_TIME Config

"Bumping" is not allowed: https://wiki.archlinux.org/index.php/Fo … te#Bumping

You're not using Denmark's locale, you're using one variable ("LC_TIME") from the "en_DK.UTF-8" locale. It's not the same thing.


Please mark your thread as solved (by editing the first post) and move on.


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#7 2012-09-05 14:17:50

hozza
Member
From: UK
Registered: 2012-07-06
Posts: 24

Re: [SOLVED] Locale LC_TIME Config

DSpider wrote:

"Bumping" is not allowed: https://wiki.archlinux.org/index.php/Fo … te#Bumping

You're not using Denmark's locale, you're using one variable ("LC_TIME") from the "en_DK.UTF-8" locale. It's not the same thing.


Please mark your thread as solved (by editing the first post) and move on.

My apologies for the bump, I know now. And thanks for the information.

Offline

Board footer

Powered by FluxBB