Knowledgebase

ubuntu18 Timezone

  • 2

To change the Timezone setting in Ubuntu, you can use the following methods:

dpkg-reconfigure

As root, use dpkg-reconfigure to set the Timezone of Ubuntu. The advantage is that there is a menu to select the region without remembering the time zone string:
# dpkg-reconfigure tzdata

After “Configuring tzdata” appears, first select the region, select “Asia” for the Asian region, and then select the city where you are, and click “OK” to complete it. At the same time, the system will print out the new Timezone time zone setting.

timedatectl

Another method is to use timedatectl. Before using it, use the following command to get the Timezone list:

# timedatectl list-timezones

However, the Timezone list is very long, and it is more convenient to filter with grep. The following will only print the time zone of the Asian region:
# timedatectl list-timezones | grep Asia

After finding the time zone you want to set, you can set:

Hong Kong time zone:
# timedatectl set-timezone Asia/Hong_Kong

Taipei time zone:
# timedatectl set-timezone Asia/Taipei

After setting, you can use the timedatectl command to check whether the time zone is set correctly:
# timedatectl


Was this answer helpful?

© Copyright 2019. CTG SERVER LTD