Change Timezone on Ubuntu

From a Terminal

export TZ=America/Los_Angeles
timedatectl

Example Output

$ timedatectl
                      Local time: Sun 2022-09-18 18:28:01 UTC
                  Universal time: Sun 2022-09-18 18:28:01 UTC
                        RTC time: Sun 2022-09-18 18:28:03
                       Time zone: Etc/UTC (UTC, +0000)
       System clock synchronized: no
systemd-timesyncd.service active: yes
                 RTC in local TZ: no

Another way

sudo timedatectl set-timezone America/Los_Angeles

Inside a Docker Container

ln -fs /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
dpkg-reconfigure --frontend noninteractive tzdata

Interactive Way

dpkg-reconfigure tzdata

Leave a Reply