Date format in GNOME 40 panel clock

Bret Busby bret.busby at gmail.com
Tue May 18 13:17:03 UTC 2021


On 18/05/2021, Bret Busby <bret.busby at gmail.com> wrote:
> On 18/05/2021, Tom H <tomh0665 at gmail.com> wrote:
>> On Mon, May 17, 2021 at 10:15 PM Bret Busby <bret.busby at gmail.com>
>> wrote:
>>>
>>> So, what happens when the OS apparently ignores the settings?
>>>
>>> Tue May 18 04:10:23 bret at bret-Aspire-V3-772:~$locale
>>> LANG=en_AU.UTF-8
>>> LANGUAGE=en_AU:en
>>> LC_CTYPE="en_AU.UTF-8"
>>> LC_NUMERIC="en_AU.UTF-8"
>>> LC_TIME="en_AU.UTF-8"
>>> LC_COLLATE="en_AU.UTF-8"
>>> LC_MONETARY="en_AU.UTF-8"
>>> LC_MESSAGES="en_AU.UTF-8"
>>> LC_PAPER="en_AU.UTF-8"
>>> LC_NAME="en_AU.UTF-8"
>>> LC_ADDRESS="en_AU.UTF-8"
>>> LC_TELEPHONE="en_AU.UTF-8"
>>> LC_MEASUREMENT="en_AU.UTF-8"
>>> LC_IDENTIFICATION="en_AU.UTF-8"
>>> LC_ALL=
>>> Tue May 18 04:10:31 bret at bret-Aspire-V3-772:~$
>>>
>>> LC_TIME shows as being
>>> LC_TIME="en_AU.UTF-8"
>>>
>>> The date format as shown in the prompt, is USA.
>>>
>>> How do I get non-USA date format?
>>
>> I have "Emglish (UK)" as "Language" and "Format" under "Region and
>> Language".
>>
>> I have the following
>>
>> th at localhost ~ $ cat /etc/environment
>> LANG=en_GB.UTF-8
>> LC_COLLATE=C
>> LC_TIME=en_US.UTF-8
>> PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
>> th at localhost ~ $
>> th at localhost ~ $ locale
>> LANG=en_GB.UTF-8
>> LANGUAGE=
>> LC_CTYPE="en_GB.UTF-8"
>> LC_NUMERIC=en_GB.UTF-8
>> LC_TIME=en_US.UTF-8
>> LC_COLLATE=C
>> LC_MONETARY=en_GB.UTF-8
>> LC_MESSAGES="en_GB.UTF-8"
>> LC_PAPER=en_GB.UTF-8
>> LC_NAME="en_GB.UTF-8"
>> LC_ADDRESS="en_GB.UTF-8"
>> LC_TELEPHONE="en_GB.UTF-8"
>> LC_MEASUREMENT=en_GB.UTF-8
>> LC_IDENTIFICATION="en_GB.UTF-8"
>> LC_ALL=
>> th at localhost ~ $
>>
>> And I have a US date format in the Gnome 40 top bar.
>>
>
> Whilst, in my case, the setting of the vraiable value, makes no
> difference, I wonder whether your having the LC_TIME variable set to
> US, is intentional, and, whether, in your case, that has any influence
> over the format of your date display.
>
>

Now, further to all of the above, I have

"
Tue May 18 20:43:29 bret at bret-Aspire-V3-772:~$locale -k LC_TIME
abday="Sun;Mon;Tue;Wed;Thu;Fri;Sat"
day="Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday"
abmon="Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec"
mon="January;February;March;April;May;June;July;August;September;October;November;December"
am_pm="AM;PM"
d_t_fmt="%a %d %b %Y %T"
d_fmt="%d/%m/%y"
t_fmt="%T"
t_fmt_ampm="%I:%M:%S %p"
era=
era_year=""
era_d_fmt=""
alt_digits=
era_d_t_fmt=""
era_t_fmt=""
time-era-num-entries=0
time-era-entries="S"
week-ndays=7
week-1stday=19971130
week-1stweek=1
first_weekday=1
first_workday=2
cal_direction=1
timezone=""
date_fmt="%a %d %b %Y %T %Z"
time-codeset="UTF-8"
alt_mon="January;February;March;April;May;June;July;August;September;October;November;December"
ab_alt_mon="Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec"
Tue May 18 20:45:52 bret at bret-Aspire-V3-772:~$
"

and

"
Tue May 18 20:45:52 bret at bret-Aspire-V3-772:~$cat /usr/share/i18n/locales/en_AU
comment_char %
escape_char /

% This file is part of the GNU C Library and contains locale data.
% The Free Software Foundation does not claim any copyright interest
% in the locale data contained in this file.  The foregoing does not
% affect the license of the GNU C Library as a whole.  It does not
% exempt you from the conditions of the license if your use would
% otherwise be governed by that license.

% English language locale for Australia
% Source: RAP
% Address: Sankt Jo//rgens Alle 8
%    DK-1615 Ko//benhavn V, Danmark
% Contact: Keld Simonsen
% Email: Keld.Simonsen at dkuug.dk
% Tel: +45 - 31226543
% Fax: +45 - 33256543
% Language: en
% Territory: AU
% Revision: 4.3
% Date: 1997-11-05
% Users: general

LC_IDENTIFICATION
title      "English locale for Australia"
source     "RAP"
address    "Sankt J<U00F8>rgens Alle 8, DK-1615 K<U00F8>benhavn V, Danmark"
contact    ""
email      "bug-glibc-locales at gnu.org"
tel        ""
fax        ""
language   "Australian English"
territory  "Australia"
revision   "1.0"
date       "2000-06-29"

category "i18n:2012";LC_IDENTIFICATION
category "i18n:2012";LC_CTYPE
category "i18n:2012";LC_COLLATE
category "i18n:2012";LC_TIME
category "i18n:2012";LC_NUMERIC
category "i18n:2012";LC_MONETARY
category "i18n:2012";LC_MESSAGES
category "i18n:2012";LC_PAPER
category "i18n:2012";LC_NAME
category "i18n:2012";LC_ADDRESS
category "i18n:2012";LC_TELEPHONE
category "i18n:2012";LC_MEASUREMENT
END LC_IDENTIFICATION

LC_CTYPE
copy "en_GB"
END LC_CTYPE

LC_COLLATE
copy "iso14651_t1"
END LC_COLLATE

LC_MONETARY
int_curr_symbol         "AUD "
currency_symbol         "$"
mon_decimal_point       "."
mon_thousands_sep       ","
mon_grouping            3;3
positive_sign           ""
negative_sign           "-"
int_frac_digits         2
frac_digits             2
p_cs_precedes           1
p_sep_by_space          0
n_cs_precedes           1
n_sep_by_space          0
p_sign_posn             1
n_sign_posn             1
END LC_MONETARY

LC_NUMERIC
decimal_point           "."
thousands_sep           ","
grouping                3;3
END LC_NUMERIC

LC_TIME
abday       "Sun";"Mon";"Tue";"Wed";"Thu";"Fri";"Sat"
day         "Sunday";/
            "Monday";/
            "Tuesday";/
            "Wednesday";/
            "Thursday";/
            "Friday";/
            "Saturday"
abmon       "Jan";"Feb";/
            "Mar";"Apr";/
            "May";"Jun";/
            "Jul";"Aug";/
            "Sep";"Oct";/
            "Nov";"Dec"
mon         "January";/
            "February";/
            "March";/
            "April";/
            "May";/
            "June";/
            "July";/
            "August";/
            "September";/
            "October";/
            "November";/
            "December"
d_t_fmt     "%a %d %b %Y %T"
date_fmt    "%a %d %b %Y %T %Z"
d_fmt       "%d//%m//%y"
t_fmt       "%T"
am_pm       "AM";"PM"
t_fmt_ampm  "%I:%M:%S %p"
week 7;19971130;1
END LC_TIME

LC_MESSAGES
copy "en_US"
END LC_MESSAGES

LC_PAPER
copy "i18n"
END LC_PAPER

LC_TELEPHONE
tel_int_fmt    "+%c %a %l"
int_prefix     "61"
int_select     "0011"
END LC_TELEPHONE

LC_MEASUREMENT
copy "i18n"
END LC_MEASUREMENT

LC_NAME
name_fmt    "%d%t%g%t%m%t%f"
END LC_NAME

LC_ADDRESS
postal_fmt    "%f%N%a%N%d%N%b%N%s %h %e %r%N%z %T%N%c%N"
country_name "Australia"
country_ab2 "AU"
country_ab3 "AUS"
country_num 036
lang_name     "English"
country_car    "AUS"
lang_ab      "en"
lang_term    "eng"
lang_lib    "eng"
END LC_ADDRESS
Tue May 18 20:49:36 bret at bret-Aspire-V3-772:~$
"

Whilst I do not know what "%a %d %b" represents, I expect it represents
weekday_name-abbreviation monthday_number month_name

If that is correct, as is shown in the representation in the system
prompt, being the same format as in the Clock applet, the date format
setting appears to be ignored by the operating system.

And, I note the output

Tue May 18 20:49:36 bret at bret-Aspire-V3-772:~$date
Tue 18 May 2021 21:03:40 AWST
Tue May 18 21:03:40 bret at bret-Aspire-V3-772:~$

So, to me, with my limited understanding, the date display format
appears to be set as
weekday_name-abbreviation monthday_number month_name
but, is displayed by the system, as
weekday_name-abbreviation month_name monthday_number
with the operating system apparently disregarding the settings.

Perhaps, someone who knows the operating system, in this regard, could
clarify this?

Of course, what would be good, would be the provision of an option to
display the date and time, fully in the ISO format, with we weekday
name abbreviation;
weekday_name-abbreviation YYYY-MM-DD HH:MM:SS (UTC<+ | ->
<increment_amount | decrement_amount>)
in the 24 hour clock time.
- provided the option would work, of course.

Thank you in anticipation.

-- 
Bret Busby
Armadale
West Australia
(UTC+0800)
..............




More information about the ubuntu-users mailing list