3

I know this should be really simple to solve but every link I read about changing format is solved using Language Support. I want the top bar date the format it should.

enter image description here

I want it to have Spanish format, i.e. "jue 24 dec", not "jue dec 24". The only thing that is spanishy about my top bar date is that it reads "jue" (from Spanish "jueves") instead of "thu".

This is the output of the locale command is:

LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=es_AR.UTF-8
LC_TIME=es_AR.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=es_AR.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=es_AR.UTF-8
LC_NAME=es_AR.UTF-8
LC_ADDRESS=es_AR.UTF-8
LC_TELEPHONE=es_AR.UTF-8
LC_MEASUREMENT=es_AR.UTF-8
LC_IDENTIFICATION=es_AR.UTF-8
LC_ALL=

I know I could install Clock Override Extension, but there should be an easy way to fix this. I did my installation in Spanish, then I changed the SO language to English.

6
  • I don't understand the question - if you want your clock to display in English format, why don't you change the Regional Format to English?
    – Sebastian
    Dec 25, 2020 at 10:41
  • @Sebastian, I want it to have Spanish format, i.e. jue 24 dec, not jue dec 24. The only thing that is spanishy about my top bar date is that it reads "jue" (from Spanish "jueves") instead of "thu".
    – Gilgamesh
    Dec 25, 2020 at 11:02
  • Okay, you should make it clear in your question that this is your problem, because it is not at all clear. But have you tried opening the properties of the clock itself and changing its format in there?
    – Sebastian
    Dec 25, 2020 at 11:05
  • @Sabastian, I'll make it explicit in that case. I don't know what you mean by "Propieties of the clock itself" and I don't have my PC right now, but I think I haven't tried it. It probably is something as trivial as it sounds. In a few hours I'll try that, if you tell me what do you mean.
    – Gilgamesh
    Dec 25, 2020 at 11:19
  • @Sebastian I use English (UK) regional format which has the following for the date: Fri 25 Dec 2020 14:43:15 However the clock is displayed in the format: Fri Dec 25 14:43 and the "clock" has nothing configurable, except "Time Format" (24-hour or AM/PM).
    – FedKad
    Dec 25, 2020 at 11:47

2 Answers 2

2

As an experiment I installed the Spanish language, opened the ~/.profile file for editing, added this line:

export LANGUAGE=es

and re-logged in. That made a difference. The explanation is that the order of the date components is taken from the language you are using, not the selected formats. So a "solution" would be to switch to Spanish as display language for the desktop.

This appears to be a design inconsistency, and it's reported here:

https://bugzilla.gnome.org/show_bug.cgi?id=789205

But as a workaround I created the file gnome-desktop-3.0.po:

msgid "%a %b %-e_%R"
msgstr "%a %-e %b_%R"
msgid "%b %-e_%R"
msgstr "%-e %b_%R"

Then I converted it to an .mo file:

msgfmt gnome-desktop-3.0.po -o gnome-desktop-3.0.mo

and saved it as:

/usr/share/locale/en/LC_MESSAGES/gnome-desktop-3.0.mo
6
  • The workarround seems a bit more subtle than the changing all the desktop display to Spanish. I liked it and it worked for me. Thank you very much.
    – Gilgamesh
    Dec 26, 2020 at 0:21
  • @MarcoCiafa: Subtle indeed, but it's at least a way to achieve a consistent date format, i.e. the weekday and month names as well as the order of the components as you would expect for a Spanish speaking country. Good that it proved to work for you. Dec 26, 2020 at 4:06
  • I have just realised that the login screen haven't changed. Do you know if it's possible to change it as well? It's not that important thought, I'm not seeing it all the time.
    – Gilgamesh
    Dec 26, 2020 at 22:54
  • @MarcoCiafa: I edited the answer with an addition which affects the login screen on my machine at least. Maybe you see the pattern now? :) Dec 27, 2020 at 5:03
  • 1
    @MarcoCiafa: I guessed. Since the weekday isn't included on my login screen I added "%b %-e_%R" (and the 'translation' of it). Dec 27, 2020 at 13:38
0

I am using Ubuntu 20.10 and I have determined that the clock has only four configuration options. Run dconf-editor under the current user and go to

/ org / gnome / desktop / interface

You have only the following configuration options:

Option Explanation
clock-format To display in 24h or 12h format
clock-show-date To display abbreviated month name and day of the month in format Mmm dd
clock-show-seconds To append seconds after minutes (hh:mm:ss)
clock-show-weekday To prepend (three-letter) abbreviated name of the day of the week

There is a Gnome extension called Clock Override, that is supposed to customize more; however this extension does not look to have been updated for recent versions of GNOME.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .