+3 votes
in Operating Systems by (39.4k points)
I want to change the timezone on my laptop, which has Ubuntu 20. How can I see the current timezone, and how can I change it to a new value?

1 Answer

+2 votes
by (281k points)
selected by
Best answer

If you want to check the current timezone setting on your machine, you can use the "timedatectl" command.


$ timedatectl
               Local time: Sun 2021-12-12 23:34:06 EST  
           Universal time: Mon 2021-12-13 04:34:06 UTC  
                 RTC time: Mon 2021-12-13 04:34:06      
                Time zone: America/New_York (EST, -0500)
System clock synchronized: yes                          
              NTP service: active                       
          RTC in local TZ: no   

You can check the list of available timezone by running the following command on the terminal:

timedatectl list-timezones

To change the timezone to a new value, you can run the following command on the terminal:

sudo timedatectl set-timezone new_time_zone_from_the_available_list

new_time_zone_from_the_available_list: list of timezones available on your machine.

After running the above command, your machine will show a new date and time per the new timezone.