‘date’ Format Differences Between CentOS 6 And 7 Using The En_GB Locale ?

Home » CentOS » ‘date’ Format Differences Between CentOS 6 And 7 Using The En_GB Locale ?
CentOS 2 Comments

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

2 thoughts on - ‘date’ Format Differences Between CentOS 6 And 7 Using The En_GB Locale ?

  • In article <429fd6a2-d125-c231-b066-14a398da4aa9@moving-picture.com>, James Pearson wrote:

    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 “/

    which translates to “%a %b %e”, e.g. “Thu Nov 15”

    CentOS 7 has:

    date_fmt “/

    which translates to “%a %e %b”, e.g. “Thu 15 Nov”

    Cheers Tony

  • Tony Mountifield wrote:

    Thanks – I guess I was so used to the RHEL/CentOS 6 format, I didn’t realise it wasn’t British :-)

    James Pearson