Product SiteDocumentation Site

3.2.2. Changing the Current Time

To change the current time, run the date command with the --set or -s option as root:
date --set HH:MM:SS
Replace HH with an hour, MM with a minute, and SS with a second, all typed in two-digit form.
By default, the date command sets the system clock to the local time. To set the system clock in UTC, run the command with the --utc or -u command line option:
date --set HH:MM:SS --utc
Example 3.7. Changing the Current Time
To change the current time to 11:26 p.m., run the following command as root:
~]# date --set 23:26:00