How to Set Time Zone in SUSE Operating System

You want to set the time zone in the SUSE operating system and you are looking for the command line to execute the activity.

Solution

Use below command to figure out the exact name of the time zone.

## COMMAND ##
timedatectl list-timezones | more

## OUTPUT ##
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
Africa/Bamako
Africa/Bangui

You can also do the filtering like below, to show only for Asia time zone.

## COMMAND ##
timedatectl list-timezones | grep -i Asia | more

## OUTPUT ##
Asia/Aden
Asia/Almaty
Asia/Amman
Asia/Anadyr
Asia/Aqtau
Asia/Aqtobe
Asia/Ashgabat
Asia/Atyrau
Asia/Baghdad
Asia/Bahrain
Asia/Baku
Asia/Bangkok
Asia/Barnaul
Asia/Beijing
Asia/Beirut
Asia/Bishkek
Asia/Brunei
Asia/Chita
Asia/Choibalsan
Asia/Colombo

Next, execute below command to change the time zone.

## COMMAND ##
timedatectl set-timezone 'Asia/Kuala_Lumpur'

To confirm,

## COMMAND ##
timedatectl

## OUTPUT ##
      Local time: Wed 2020-08-19 15:12:58 +08
  Universal time: Wed 2020-08-19 07:12:58 UTC
        RTC time: Wed 2020-08-19 07:12:57
       Time zone: Asia/Kuala_Lumpur (+08, +0800)
 Network time on: no
NTP synchronized: yes
 RTC in local TZ: no

Done!

You May Also Like

Leave a Reply?