Date & Time format for the system

OS: Zorin 16 Pro

My current date & time format is in United States. I know I can change it to other locale. But what I want is ISO 8601 format and in English. Is there an option for that Zorin?

Currently it's Tue Nov 30 09:56:25. What I want is something like 2021-11-30 T 09:56:25

Any thoughts?

In the date time settings i believe there is an option for a custom value... select that and you can use %y-%m-%d %H:%m:%s. Forgive me if I'm wrong, I'm using kde now for a while. You may also be able to adjust it in gnome-tweaks... but I'm not sure.

You may also be able to adjust it in gnome-tweaks... but I'm not sure.

Not possible. Unless you know where the config files are. Maybe then I can change its value display on the Top Bar.

@Aravisian may be able to help a little more with this. He is our resident expert on theming and adjusting some of the most stubborn settings in gnome. It's not his favorite thing to do, but i have seen some amazing work from him!

Elevate your file manager to root.
Navigate to and edit the file:
/usr/share/i18n/locales/en_US

Scroll down to date_fmt (probably around line 121)
Change it to date_fmt "%Y-%m-%d %H:%M:%S"
Save the file and exit.
Generate your locale:

sudo localedef -f UTF-8 -i my_en_US MY_en.UTF-8

Add environment vairable:

sudo localectl set-locale LC_TIME=MY_en.UTF-8

Reboot and test.

Thars a gnome in muh boot.

4 Likes
Summary

Elevate your file manager to root.
Navigate to and edit the file:
/usr/share/i18n/locales/en_US

Scroll down to date_fmt (probably around line 121)
Change it to date_fmt "%Y-%m-%d %H:%M:%S"
Save the file and exit.

Everything went alright with the instructions above.

Summary

Generate your locale:

sudo localedef -f UTF-8 -i my_en_US MY_en.UTF-8

Here it says cannot be found. my_en_US
then I did the next command sudo localectl set-locale LC_TIME=MY_en.UTF-8

Reboot and it's still Tue Nov 30 12:51:37.

What went wrong?

Me forgetting to post:

sudo cp en_US my_en_US

It's no biggie though, you can adapt with:

sudo localedef -f UTF-8 -i en_US en.UTF-8
sudo localectl set-locale LC_TIME=en.UTF-8

If that says file not found:

cd /usr/share/i18n/locales

Then run the above...

I did all of the above and reboot.

It is still Tue Nov 30 13:10:33


Here is the region and date and time settings.

You can try:
Add

export LC_TIME="en_US"

to ~.profile

Im kind of stumped. That really should have worked...

I tried adding that line into .profile.
reboot
and then it gave a black screen with error cannot find the LC_Time thing and that I should fix the .profile immediately. I tried opening Terminal and it did not open. So I opened the .profile and removed that line you told me to add.

So I am back to square 1.

Well, my mind is now blown.

See Harvey? False confidence...
:stuck_out_tongue:

(I will do some searching and look into it...)

2 Likes

Are we looking at something like this?

export LC_TIME="en_US.UTF-8"
perhaps?
I think yuuki will be nervous. :stuck_out_tongue:

Read some info from the internet - this can be done with an extensions called "Panel date time format" but sadly it's not available for the version 3.38.4.
The one from github is for version Gnome 40

I tried export LC_TIME="en_US.UTF-8"
No error but the time is still Tue Nov 30 16:17:57

So this won't work for us on Gnome 3.38.4 :frowning:

In dconf-editor, there is a setting
/com/canonical/indicator/datetime/time-format

gsettings set com.canonical.indicator.datetime time-format 'custom'

gsettings set com.canonical.indicator.datetime custom-time-format '%Y-%m-%d %H:%M:%S'

https://linuxize.com/post/how-to-set-or-change-timezone-in-linux/ Did you reading that?

I don't have the "indicator" subfolder under "canonical" in my Zorin 16. There is only a "unity" subfolder:
dconf-editor

Nevertheless, there is a gnome-shell extension to customize the date time format called "Clock Override" where you can create a custom string.

1 Like

I have it and I am also on Zorin OS 16.