Changing the timezone in CentOS 7 and RHEL (Red Hat Enterprise Linux 7)

9 Sep

To change your password in RHEL or CentOS 7 you utilize the timedatectl command as described:

timedatectl list-timezone (to list time zones)
timedatectl set-timezone (to set time zone)
timedatectl status (to check current time / date configuration)

Here are some examples:

# timedatectl list-timezones | grep Pacific
Pacific/Apia
Pacific/Auckland
Pacific/Chatham
Pacific/Chuuk
Pacific/Easter
Pacific/Efate
Pacific/Enderbury
Pacific/Fakaofo
Pacific/Fiji
Pacific/Funafuti
Pacific/Galapagos
Pacific/Gambier
Pacific/Guadalcanal
Pacific/Guam
Pacific/Honolulu
Pacific/Johnston
Pacific/Kiritimati
Pacific/Kosrae
Pacific/Kwajalein
Pacific/Majuro
Pacific/Marquesas
Pacific/Midway
Pacific/Nauru
Pacific/Niue
Pacific/Norfolk
Pacific/Noumea
Pacific/Pago_Pago
Pacific/Palau
Pacific/Pitcairn
Pacific/Pohnpei
Pacific/Port_Moresby
Pacific/Rarotonga
Pacific/Saipan
Pacific/Tahiti
Pacific/Tarawa
Pacific/Tongatapu
Pacific/Wake
Pacific/Wallis
[root@usherlxd82 sssd]# timedatectl list-timezones | grep US
[root@usherlxd82 sssd]# timedatectl list-timezones | grep U
America/Argentina/Ushuaia
Antarctica/DumontDUrville
Asia/Ulaanbaatar
Asia/Urumqi
Asia/Ust-Nera
Europe/Uzhgorod
[root@usherlxd82 sssd]# timedatectl list-timezones | grep United
[root@usherlxd82 sssd]# timedatectl list-timezones | grep Pacific
Pacific/Apia
Pacific/Auckland
Pacific/Chatham
Pacific/Chuuk
Pacific/Easter
Pacific/Efate
Pacific/Enderbury
Pacific/Fakaofo
Pacific/Fiji
Pacific/Funafuti
Pacific/Galapagos
Pacific/Gambier
Pacific/Guadalcanal
Pacific/Guam
Pacific/Honolulu
Pacific/Johnston
Pacific/Kiritimati
Pacific/Kosrae
Pacific/Kwajalein
Pacific/Majuro
Pacific/Marquesas
Pacific/Midway
Pacific/Nauru
Pacific/Niue
Pacific/Norfolk
Pacific/Noumea
Pacific/Pago_Pago
Pacific/Palau
Pacific/Pitcairn
Pacific/Pohnpei
Pacific/Port_Moresby
Pacific/Rarotonga
Pacific/Saipan
Pacific/Tahiti
Pacific/Tarawa
Pacific/Tongatapu
Pacific/Wake
Pacific/Wallis

timedatectl set-timezone America/Los_Angeles

# timedatectl status
Local time: Tue 2014-09-09 09:56:24 PDT
Universal time: Tue 2014-09-09 16:56:24 UTC
RTC time: Tue 2014-09-09 16:56:24
Timezone: America/Los_Angeles (PDT, -0700)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: yes
Last DST change: DST began at
Sun 2014-03-09 01:59:59 PST
Sun 2014-03-09 03:00:00 PDT
Next DST change: DST ends (the clock jumps one hour backwards) at
Sun 2014-11-02 01:59:59 PDT
Sun 2014-11-02 01:00:00 PST

I love the fact that it details the DST ends (i.e., fall back)

ben.kevan

I am ben kevan.. Well yeah. .that's about it.

Leave a Reply

Your email address will not be published. Required fields are marked *