×

Are you trying to change the Date, Time, and Timezone in Ubuntu ?

This guide is for you.


All the modern operating systems that we use today are synchronized with NIST atomic clock. Therefore, we generally do not find any need of changing the date, time, and Timezone of our systems. 

However, at times it happens that we may mess up these features while performing some system configurations and we may feel the need of manually changing these entities later on.

Here at LinuxAPT, as part of our Server management Services, we regularly help our Customers to perform Ubuntu related queries.

In this context, we shall look into the different methods to modify the date, time, and Timezone in Ubuntu 20.04.


How to change the Date, Time, and Timezone in Ubuntu 20.04 ?

To modify the date, time, and Timezone in Ubuntu 20.04, you can follow the methods that we have described below. 

However, before proceeding with these methods, we would first like to take a look at the current date, time, and Timezone of our Ubuntu 20.04 system. 

These entities can be found out by running the following command:

$ timedatectl

This command will display the current date, time, and Timezone along with some other information.


If the NTP Service is active, then you need to deactivate this feature otherwise your system should not be synchronized with the NIST atomic clock if you want to manually change the date, time, and Timezone. 

To deactivate this feature, you have to run the following command:

$ timedatectl set-ntp no

Once deactivated successfully, you will not be able to see any error messages on the terminal in relation to NTP.

Next, let's see the methods to change the date, time, and Timezone of our Ubuntu 20.04 system.


How to modify the Date in Ubuntu 20.04?

To change the date in your Ubuntu 20.04 system, you have to run the following command:

$ timedatectl set-time YYYY-MM-DD 

Here, you have to replace YYYY with your desired year such as 2021, MM with your desired month such as 01, and DD with your desired date such as 01.

The the command would be:

$ timedatectl set-time 2021-01-01

To check whether the date of our Ubuntu 20.04 system has been changed or not , simply execute the “timedatectl” command once again.


How to change the Time in Ubuntu 20.04?

To modify the time in your Ubuntu 20.04 system, you have to run the following command:

$ timedatectl set-time hh-mm-ss

Here, you have to replace hh with your desired hours such as 10, mm with your desired minutes such as 10, and ss with your desired seconds such as 10. 

Then the command to run would be:

$ timedatectl set-time 10-10-10

To confirm the changes made, you can run the "timedatectl" command once again.


How to change the Timezone in Ubuntu 20.04?

To modify the Timezone in your Ubuntu 20.04 system, you first need to take a look at all the available Time zones in your Ubuntu 20.04 system by running the command shown below:

$ timedatectl list-timezones

This will display the list of all the available Time zones.

Out of all these Time zones, you can pick any one of your choice to change your system's Timezone.

Now you can change the Timezone by running the command shown below:

$ timedatectl set-timezone region/location

Here, you have to replace region and location with the exact name of the region and location of the Timezone that you have selected from the list of the available Time zones such as Australia and Adelaide.

So the command would be:

$ timedatectl set-timezone Australia/Adelaide

Now we will check whether the Timezone of our Ubuntu 20.04 system has been changed or not by running the “timedatectl” command once again. 


[Need urgent assistance to install Software or Packages on your Ubuntu Linux ? We are available to help you. ]


Conclusion