How To Change Timezone on Ubuntu

Infrastructure,UbuntuTimezone,Ubuntu


Check Current Timezone

$ timedatectl

Example:

$ timedatectl
               Local time: Wed 2020-07-01 01:35:04 UTC
           Universal time: Wed 2020-07-01 01:35:04 UTC
                 RTC time: Wed 2020-07-01 01:35:05
                Time zone: Etc/UTC (UTC, +0000)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no


Change Timezone

By using “timedatectl", you can change the timezone. At first, with “list-timezones" option, you can list all available time zones.

$ timedatectl list-timezones

Example:

$ timedatectl list-timezones
Africa/Abidjan
Africa/Accra
Africa/Algiers
Africa/Bissau
Africa/Cairo
Africa/Casablanca
Africa/Ceuta
Africa/El_Aaiun
Africa/Johannesburg
Africa/Juba
Africa/Khartoum
Africa/Lagos
Africa/Maputo
:
:

If timezone will be changed to Los Angeles, use the following command.

$ sudo timedatectl set-timezone America/Los_Angeles