Skip to main content

timedatectl | Change Date/Time in RHEL

Show Status

To display status

timedatectl

Disable/Enable NTP

Firstly, temporarily disable the NTP service, if active.

timedatectl set-ntp no

To enable.

timedatectl set-ntp yes

Change Time

We must adhere to the following syntax rule to change the current local time where HH is for hours, MM for minutes, and SS for seconds.

timedatectl set-time HH:MM:SS
timedatectl set-time 18:05:00

Change Date

To change the current date, adhere to the following command syntax where YYYY is for a year, MM for a month, and DD for a day.

timedatectl set-time YYYY-MM-DD
timedatectl set-time 2021-11-17

Change Timezone 

List timezone

timedatectl list-timezones

To change/edit the Time Zone you are under, adhere to the following command syntax.

timedatectl set-timezone your_preferred_time_zone
timedatectl set-timezone Asia/Singapore