Linux time and clock configuration

From PedrosBrainDump
Revision as of 22:29, 6 October 2024 by 413vhcu1lq0463ob (talk | contribs) (Created page with "=== Changing timezone on Linux === To change the timezone on linux you can use the command : timedatectl set-timezone <your_time_zone> To see all timezones avaliable you can use the command: timedatectl list-timezones Africa/Abidjan Africa/Accra Africa/Addis_Ababa Africa/Algiers Africa/Asmara Africa/Asmera Africa/Bamako Africa/Bangui Africa/Banjul Africa/Bissau . . . (e.g.) timedatectl set-timezone America/Sao_Paulo === Manually configure clock on Linux...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Changing timezone on Linux

To change the timezone on linux you can use the command :

timedatectl set-timezone <your_time_zone>

To see all timezones avaliable you can use the command:

timedatectl list-timezones
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
Africa/Asmera
Africa/Bamako
Africa/Bangui
Africa/Banjul
Africa/Bissau
.
.
.

(e.g.)

timedatectl set-timezone America/Sao_Paulo

Manually configure clock on Linux

To manually configure the clock on Linux you can use the command:

date MMDDhhmmYYYY.ss
  • MM - month
  • DD - day
  • hh - hour
  • mm - minute
  • YYYY - year
  • ss - second

(e.g) april 15 2003 06h12PM (18h12)

date 041518122003.00