Prologue#
This was tested on the Ubuntu 20
, I’m not sure if it will work on yours if you are not using the same system.#
The commands we discuss in this article may need to be used with sudo
when you don’t have permission.#
Command timedatectl
to see current timezone setting#
Run timedatectl
to check the current timezone:
1$ timedatectl
2 Local time: Wed 2022-08-24 13:32:04 CST
3 Universal time: Wed 2022-08-24 05:32:04 UTC
4 RTC time: Wed 2022-08-24 05:32:04
5 Time zone: Asia/Taipei (CST, +0800)
6System clock synchronized: yes
7 NTP service: active
8 RTC in local TZ: no
Command timedatectl list-timezones
to list timezones#
Run timedatectl list-timezones
to list the timezones, and find out the timezone which you want to set:
1$ timedatectl list-timezones
2Africa/Abidjan
3Africa/Accra
4Africa/Addis_Ababa
5...
6Asia/Taipei
7...
8W-SU
9WET
10Zulu
Command timedatectl set-timezone
to set timezone#
Use timedatectl set-timezone <timezone>
command to set the timezone, for example:
1$ timedatectl set-timezone Asia/Taipei
Then use command timedatectl
after set to check timezone again.
References#
- 《How To Set or Change Timezone on Ubuntu 20.04》https://linuxize.com/post/how-to-set-or-change-timezone-on-ubuntu-20-04/