How to change time zone on Debian 10

s2 0

If you’ve set up your Debian system to automatically obtain the time zone, it will sync your system time over the internet so that your system has the time zone as your closest location. If you want to change the time zone according to your own preference, Debian gives you two ways to do it; via the command line and via the graphical user interface.

In this article we explain how to change the current time zone of a Debian 10 buster system.

How to check the current time zone

Check the time zone from the command line

Open your Terminal application using the Application Launcher search as follows:

You can access the Application Launcher using the Super / Windows button on your laptop.

Then enter the following command to view information about your system time and time zone:

$ timedatectl

You can also view this information with the following command:

$ ls -l /etc/localtime

Local time

Check the time zone through the user interface

To view information about the current time zone through the user interface, you must access the date and time settings. You can do this through the Application Launcher as follows:

Date and Time

Click the Date & Time search result to open the following settings view:

Date and time settings in GNOME

How to change the time zone

Change the time zone from the command line

Open Terminal and enter the following command to list time zones of a specific zone:

Syntax:

$ timedatectl list-timezones | grep -i [zone]

Example:

We use this command to list all time zones in Europe:

$ timedatectl list-timezones | grep -i europe

List time zones

In this example we set the time zone to Europe / Istanbul. First, let’s unlink the system time from local time with 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 check the changed settings with one of the following commands:

$ timedatectl

or

$ ls -l /etc/localtime

Deactivate local time

Check the time zone through the user interface

On the Date & Time tab in the Debian Settings utility, you must first unlock the settings in this view. To do this, click the Unlock button and enter authentication details as only an authorized user can change the date and time settings.

Authenticate as administrator

Click the Authenticate button. You will now see the settings as active / configurable.

Please turn off the Automatic Time Zone button if it is on:

Date and time settings

Then click the Time Zone option to change the time zone.

choose country

In the view above, you can either search for a time zone using the search bar or manually switch to your time zone using the mouse. Once you do this, your system’s time zone will be changed.

As you have seen, it is very easy to change the time zone of your Debian system from both the user interface and the command line. You just need to follow a simple procedure and use some commands to accomplish this task.

How to change time zone on Debian 10