

Set Hardware Clock to UTC Synchronizing Linux System Clock with a Remote NTP Server Set your hardware clock to coordinated universal time (UTC): # timedatectl set-local-rtc 0 Set your hardware clock to local timezone: # timedatectl set-local-rtc 1 To set your hardware clock to coordinated universal time, UTC, use the set-local-rtc boolean-value option as follows:įirst Find out if your hardware clock is set to local timezone: # timedatectl | grep local

#Utc clock online how to#
Set Date in Linux Set Date and Time in Linux How to Find and Set Hardware Clock in Linuxĩ. To set date and time, we can use a set-time switch along with the format of date in YY:MM:DD (Year, Month, Day) and time in HH:MM:SS (Hour, Minute, and Seconds). You need to disable it using the below command. The error says that the NTP service is active. You may get the below error when setting the date as shown above: Failed to set time: NTP unit is activeħ. To set time only, we can use a set-time switch along with the format of time in HH:MM:SS (Hour, Minute, and Seconds). You can set the date and time on your system, using the timedatectl command as follows: Set Time in Linux Set Correct Timezone in Linux How to Set Time and Date in LinuxĦ. You need to type the correct name timezone otherwise you may get errors when changing the timezone, in the following example, the timezone “Asia/Kolkata” is not correct therefore causing the error. It is always recommended to use and set the coordinated universal time, UTC. # timedatectl set-timezone "Asia/Kolkata" To set your local timezone in Linux, we will use the set-timezone switch as shown below. # timedatectl list-timezones | egrep -o "America/N.*"ĥ. # timedatectl list-timezones | egrep -o "Europe/L.*" To find the local timezone according to your location, run the following command: # timedatectl list-timezones | egrep -o "Asia/B.*" To view all available timezones, run the command below: # timedatectl list-timezonesĤ. The time on your Linux system is always managed through the timezone set on the system, to view your current timezone, do it as follows: # timedatectlģ. In the screencast above, RTC time is the hardware clock time.Ģ. To display the current time and date on your system, use the timedatectl command from the command line as follows: # timedatectl status How to Find and Set Local Timezone in Linuxġ.

