James Pearson
2018-Nov-15 11:49 UTC
[CentOS] 'date' format differences between CentOS 6 and 7 using the en_GB locale ?
Just noticed that the output of 'date' is different between CentOS 6 and 7 when using the 'en_GB' locale - e.g.: CentOS 6: % LANG=en_GB date Thu Nov 15 11:42:46 GMT 2018 % LANG=en_US date Thu Nov 15 11:42:56 GMT 2018 CentOS 7: % LANG=en_GB date Thu 15 Nov 11:43:07 GMT 2018 % LANG=en_US date Thu Nov 15 11:43:11 GMT 2018 i.e. with LANG=en_GB on CentOS 7, the day and month are swapped when compared with CentOS 6 Any one know why the en_GB locale has changed between CentOS 6 and 7 ? Thanks James Pearson
Tony Mountifield
2018-Nov-15 14:44 UTC
[CentOS] 'date' format differences between CentOS 6 and 7 using the en_GB locale ?
In article <429fd6a2-d125-c231-b066-14a398da4aa9 at moving-picture.com>, James Pearson <james-p at moving-picture.com> wrote:> Just noticed that the output of 'date' is different between CentOS 6 and > 7 when using the 'en_GB' locale - e.g.: > > CentOS 6: > > % LANG=en_GB date > Thu Nov 15 11:42:46 GMT 2018 > % LANG=en_US date > Thu Nov 15 11:42:56 GMT 2018 > > CentOS 7: > > % LANG=en_GB date > Thu 15 Nov 11:43:07 GMT 2018 > % LANG=en_US date > Thu Nov 15 11:43:11 GMT 2018 > > i.e. with LANG=en_GB on CentOS 7, the day and month are swapped when > compared with CentOS 6 > > Any one know why the en_GB locale has changed between CentOS 6 and 7 ? > > Thanks > > James PearsonLooks like a simple oversight or bug in RHEL 6 that was fixed for 7. The latter is correct for UK standard usage. CentOS just follows RHEL. It is defined in the file /usr/share/i18n/locales/en_GB CentOS 6 has: date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/ which translates to "%a %b %e", e.g. "Thu Nov 15" CentOS 7 has: date_fmt "<U0025><U0061><U0020><U0025><U0065><U0020><U0025><U0062>/ which translates to "%a %e %b", e.g. "Thu 15 Nov" Cheers Tony -- Tony Mountifield Work: tony at softins.co.uk - http://www.softins.co.uk Play: tony at mountifield.org - http://tony.mountifield.org
James Pearson
2018-Nov-15 15:23 UTC
[CentOS] 'date' format differences between CentOS 6 and 7 using the en_GB locale ?
Tony Mountifield wrote:> > In article <429fd6a2-d125-c231-b066-14a398da4aa9 at moving-picture.com>, > James Pearson <james-p at moving-picture.com> wrote: >> Just noticed that the output of 'date' is different between CentOS 6 and >> 7 when using the 'en_GB' locale - e.g.: >> >> CentOS 6: >> >> % LANG=en_GB date >> Thu Nov 15 11:42:46 GMT 2018 >> % LANG=en_US date >> Thu Nov 15 11:42:56 GMT 2018 >> >> CentOS 7: >> >> % LANG=en_GB date >> Thu 15 Nov 11:43:07 GMT 2018 >> % LANG=en_US date >> Thu Nov 15 11:43:11 GMT 2018 >> >> i.e. with LANG=en_GB on CentOS 7, the day and month are swapped when >> compared with CentOS 6 >> >> Any one know why the en_GB locale has changed between CentOS 6 and 7 ? >> >> Thanks >> >> James Pearson > > Looks like a simple oversight or bug in RHEL 6 that was fixed for 7. > The latter is correct for UK standard usage. CentOS just follows RHEL. > > It is defined in the file /usr/share/i18n/locales/en_GB > > CentOS 6 has: > > date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/ > > which translates to "%a %b %e", e.g. "Thu Nov 15" > > CentOS 7 has: > > date_fmt "<U0025><U0061><U0020><U0025><U0065><U0020><U0025><U0062>/ > > which translates to "%a %e %b", e.g. "Thu 15 Nov"Thanks - I guess I was so used to the RHEL/CentOS 6 format, I didn't realise it wasn't British :-) James Pearson
Apparently Analagous Threads
- 'date' format differences between CentOS 6 and 7 using the en_GB locale ?
- Unicode whitespace
- Re: [virt-tools-list] Unable to complete install: ''Domain not found: xenUnifiedDomainLookupByName
- Virt-manager issue resolved
- GetText: Works with en_GB and en_US, but doesn''t with de_DE!