Checking and setting the time zone --timedatectl command

You can check and change the time zone with the timedatectl command . The time zone sets how far each country's time is ahead of UTC time(Coordinated Universal Time).

In Japan, it is 9 hours ahead.

Check time zone

You can check the current time zone with the timedatectl command.

timedatectl

The currently set time zone is displayed as shown below. The default is "UTC".

                      Local time: Wed 2020-05-13 03:44:55 UTC
                  Universal time: Wed 2020-05-13 03:44:55 UTC
                        RTC time: Wed 2020-05-13 03:44:55
                       Time zone: Etc / UTC (UTC, +0000)
       System clock synchronized: yes
systemd-timesyncd.service active: yes
                 RTC in local TZ: no

List of available time zones

Use the "timedatectl list-timezones" command to display a list of available timezones.

timedatectl list-timezones

You will see a lot. In the case of Japan, it is "Asia / Tokyo".

Asia / Tashkent
Asia / Tbilisi
Asia / Tehran
Asia / Thimphu
Asia / Tokyo
Asia / Tomsk
Asia / Ulaanbaatar
Asia / Urumqi
Asia / Ust-Nera
Asia / Vientiane
Asia / Vladivostok

Change time zone

Let's change the time zone. Use the "timedatectl set-timezone" command to change the timezone. For here in Japan, set "Asia / Tokyo". Execute with administrator privileges using the sudo command.

sudo timedatectl set-timezone Asia / Tokyo

Associated Information