How To Change the TimeZone on Ubuntu 23.04

In this wiki article, We will learn how to change the Timezone on Ubuntu 23.04 using the timedatectl command.

Check your Current TimeZone

To get detailed information on your Ubuntu date, time, and timezone you use the timedatectl command.

timedatectl

Output:

root@ubuntu:~# timedatectl
               Local time: Fri 2023-04-14 18:55:03 UTC
           Universal time: Fri 2023-04-14 18:55:03 UTC
                 RTC time: Fri 2023-04-14 18:55:03
                Time zone: Etc/UTC (UTC, +0000)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no

The TimeZone configuration on Ubuntu OS is stored set by the /etc/localtime file. This file is a symbolic link to a timezone file under /usr/share/zoneinfo.

To get a basic view of the timezone you can ls the file to its symbolic link.

ls -l /etc/localtime

Output:

root@ubuntu:~# ls -l /etc/localtime
lrwxrwxrwx 1 root root 27 Mar 29 09:19 /etc/localtime -> /usr/share/zoneinfo/Etc/UTC

The system’s timezone is also written to the /etc/timezone file.

cat /etc/timezone

Output:

root@ubuntu:~# cat /etc/timezone
Etc/UTC

Listing TimeZones

Using list-timezones option to list TimeZones available, this can be used later to set as default.

timedatectl list-timezones

Output:

root@ubuntu:~# timedatectl list-timezones
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
Africa/Asmera
Africa/Bamako
Africa/Bangui
Africa/Banjul
Africa/Bissau
Africa/Blantyre

.....

Set your Preferred TimeZone

Once you have the list of timezones, you can set the one you prefer.

timedatectl set-timezone your_time_zone

Example:

root@ubuntu:~# timedatectl set-timezone Asia/Calcutta

Confirm your changes were applied by running the timedatactl command.

timedatectl

Output:

root@ubuntu:~# timedatectl
               Local time: Sat 2023-04-15 01:07:16 IST
           Universal time: Fri 2023-04-14 19:37:16 UTC
                 RTC time: Fri 2023-04-14 19:37:16
                Time zone: Asia/Calcutta (IST, +0530)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no