Need to change clock from 24 hour format to 12.

Hi, I setup freebsd years ago to use the 12 hour format clock. It worked back then. Recently last week the cmos aka bios battery died. I today replaced the battery.
In bios had to set the time and some fan settings back to the original settings.

I ran and booted into freebsd 14.1 and I use gnome 14 the latest version . Before last week I had this system running and it displayed the 12 hour format on the desktop gui.
After this battery change. It's back to a 24 hour format. If I go into settings in the date and time. It won't store the settings meaning I can have it automatically detect date and time.
I would put that on to use ntpd and the location always shows I am at UK when I am not. I would change it to where I am located. After putting those settings once closed and then opened back up
it reverts back to the original stuff. It won't store the settings I just selected. Also at the bottme there's a setting called Time Format but next to it shows nothing. Normally it has an drop down menu option for am/pm or 24hr. Something like that. However, it has no setting changes options.

I want to change the clock from 24 hours to 12 hours. How can I do this in terminal?

the locale variable time uses "en_US.UTF-8" I looked online and it said if this is set it should automatically default to a 12 hour clock.

I would like to know how to change the clock from 24 hours to 12 hours in the latest version of gnome 14. Yes, I am using the latest freebsd 14.1 version of the OS.
 
[…] the locale variable time uses "en_US.UTF-8" I looked online and it said if this is set it should automatically default to a 12 hour clock. […]
Well, “online” is wrong. Check locale(1):​
Bash:
LC_TIME='en_US.UTF-8' locale d_t_fmt t_fmt
You write you had installed your system years ago. Apparently commit 67DA0698 adopted military time (again). I am not familiar with the proper workflow, so a quick’n’dirty fix is to edit /usr/share/locale/en_US.UTF-8/LC_TIME reversing this change.​
[…] the location always shows I am at UK when I am not. I would change it to where I am located. […]
There are programs (not part of the base system) dynamically detecting “where am I” based on some heuristics (e. g. WiFi beacons) and triggering actions accordingly (e. g. select a time zone), but the most reliable is still you telling the system the (preferred) time zone, tzsetup(8).​
 
Given this happened to you when you reset CMOS by changing battery double-check you didn't miss anything in BIOS.
I'm assuming you mean Gnome 41 and not 14 (as 14 would be really old one). Gnome 41 independently of timezone settings can show time in 12/24h format. Did you check that?

In shell you can force 12h format by adding format: date +"%r".
 
Back
Top