Set Timezone Ubuntu

·

2 min read

Changing the Timezone Using the timedatectl Command

Before changing the timezone, you’ll need to find out the long name for the timezone you want to use. The timezones are using “Region/City” format.

To list all available time zones, you can either list the files in the /usr/share/zoneinfo directory or invoke the timedatectl command with the list-timezones option:

timedatectl list-timezones
...
America/Montevideo
America/Nassau
America/New_York
America/Nipigon
America/Nome
America/Noronha
...

Once you identify which time zone is accurate to your location, run the following command as sudo user:

sudo timedatectl set-timezone your_time_zone

For instance, to change the system’s timezone to America/New_York:

sudo timedatectl set-timezone America/New_York

Invoke the timedatectl command to verify the changes:

timedatectl
               Local time: Wed 2020-05-06 15:41:42 EDT  
           Universal time: Wed 2020-05-06 19:41:42 UTC  
                 RTC time: Wed 2020-05-06 19:41:48      
                Time zone: America/New_York (EDT, -0400)
System clock synchronized: yes                         
              NTP service: active                      
          RTC in local TZ: no

srv : Changing the Timezone Using the timedatectl Command

Before changing the timezone, you’ll need to find out the long name for the timezone you want to use. The timezones are using “Region/City” format.

To list all available time zones, you can either list the files in the /usr/share/zoneinfo directory or invoke the timedatectl command with the list-timezones option:

timedatectl list-timezones
...
America/Montevideo
America/Nassau
America/New_York
America/Nipigon
America/Nome
America/Noronha
...

Once you identify which time zone is accurate to your location, run the following command as sudo user:

sudo timedatectl set-timezone your_time_zone

For instance, to change the system’s timezone to America/New_York:

sudo timedatectl set-timezone America/New_York

Invoke the timedatectl command to verify the changes:

timedatectl
               Local time: Wed 2020-05-06 15:41:42 EDT  
           Universal time: Wed 2020-05-06 19:41:42 UTC  
                 RTC time: Wed 2020-05-06 19:41:48      
                Time zone: America/New_York (EDT, -0400)
System clock synchronized: yes                         
              NTP service: active                      
          RTC in local TZ: no

src = https://linuxize.com/post/how-to-set-or-change-timezone-on-ubuntu-20-04/#changing-the-timezone-using-the-timedatectl-command