We have different time zones because different parts of our planet enter daylight at different times. Similarly, time in our machine is set according to our location. Many tasks of our system need the correct time and date therefore it is very important to properly set the time zone of your system.
In Ubuntu, the time is set while installation of the operating system but it can be changed later. Ubuntu automatically sets the time zone but if you want to set it manually then there are two main approaches one is through simple GUI and the other one is using the terminal.
Let’s find out how to set the time zone manually on Ubuntu:
How to change time zone using in Ubuntu 20.04 (LTS) and 20.10 using GUI
The simplest way to modify the time zone is by using GUI. Open settings and click on “Time and Date”. After that click on Time Zone:
As it can be seen the time zone is set to “Europe-London” to change the time zone click on the map or type in the search box:
I am changing the time zone to “New York, United States”:
How to change time zone using in Ubuntu 20.04 (LTS) and 20.10 using Terminal
Open terminal type the following command to check the current status of time and time zone:
$timedatectl
The other way to check time zone is using:
$ls -l /etc/localtime
The third way to check is by reading the time zone file:
$cat /etc/timezone
Now, to change time zone first we need to get a list of time zone using:
$timedatctl list-timezones
Now choose the time zone and put the command mentioned below:
$sudo timedatectl set timezone America/New_York
And to verify it use:
$timedatctl
Conclusion:
Time zone is very essential since many system tasks depend on time, such as scheduling tasks, file information, software authorization, etc. The operating system sets a time zone upon connecting to the internet but in some situations, you may need to change it manually. The focus of this guide is to learn how to modify the default time zone using GUI or terminal.
TUTORIALS ON LINUX, PROGRAMMING & TECHNOLOGY