Guys, I need some very simple help.
I need to change the time zone of Rocky Linux 9 by 24 hours instead of 12 hours. How do I change it to 24 hours?
I tried several commands and nothing worked.
I did some tests but I was unsuccessful.
command:
sudo localectl set-locale LC_TIME=C.utf8
timedatectl status
Local time: Tue 2024-10-22 16:49:03 -03
Universal time: Tue 2024-10-22 19:49:03 UTC
RTC time: Tue 2024-10-22 16:49:03
Time zone: America/Sao_Paulo (-03, -0300)
System clock synchronized: yes
NTP service: active
RTC in local TZ: yes
Are you talking about time format, as displayed? E.g. 18:45 vs 6:45pm
Displayed by whom?
GNOME GUI? Settings / Date & Time has Time Format options “24-hour” and “AM / PM”.
Terminal, ls? The man ls and info '(coreutils) ls invocation' do mention that format may use info from timezone and or locale. They also mention environment variables TIME_STYLE and LC_TIME.