Open the Terminal and enter the following command in order to list all the timezones of the specified zone:
Syntax:
$ timedatectl list-timezones | grep -i [zone]
Example:
We will use this command to list all the time zones of Europe:
$ timedatectl list-timezones | grep -i europe
In this example, we will be setting the time zone to Europe/Istanbul. First, let us unlink the system time with local time through the following command:
$ sudo unlink /etc/localtime
The next step is to use the following command to set a new time zone:
Syntax:
sudo ln -s /usr/share/zoneinfo/[Zone/TimeZone] /etc/localtime
Example:
sudo ln -s /usr/share/zoneinfo/Europe/Istanbul /etc/localtime
You can then verify the changed settings through one of the following commands:
$ timedatectl
or
$ ls -l /etc/localtime
How to Check the Current Time Zone
Open your Terminal application through Ubuntu Dash or through the Ctrl+Alt+T shortcut. Enter the following command in order to view information about your system’s time and time zone:
$ timedatectl
You can also view this information by using the following command:
$ ls -l /etc/localtime
İlk Yorumu Siz Yapın