GNU/Linux Desktop Survival Guide
by Graham Williams |
|||||
Set the Timezone |
20210110 Once a timezone is set the operating system's time is determined as an offset from UTC (the Coordinated Universal Time).
The timezone will be automatically set if Location Services permissions are enabled. To enable Location Services permissions, under Settings, choose Privacy and set Location Services on.
To set the timezone use the timedatectl command from the systemd package. A list of timezones is available with the list-timezones command:
$ timedatectl list-timezones Africa/Abidjan Africa/Accra Africa/Addis_Ababa ... Asia/Seoul Asia/Shanghai Asia/Singapore ... Australia/Melbourne Australia/Perth Australia/Sydney Europe/Amsterdam ... Pacific/Tongatapu Pacific/Wake Pacific/Wallis UTC |
Then set the timezone for a specific region:
$ sudo timedatectl set-timezone Australia/Canberra $ sudo timedatectl set-timezone Asia/Singapore |
Then check the current time:
$ date |
Another way to change the timezone of the operating system manually is to reconfigure the tzdata package. This will ask for the timezone, selected from a list of known regions.
$ wajig reconfigure tzdata Current default time zone: 'Australia/Canberra' Local time is now: Sat 30 Nov 12:17:07 AEDT 2019. Universal Time is now: Sat Nov 30 01:17:07 UTC 2019. |
The use of an older command, tzconfig, is deprecated.