How to Change TimeZone on Debian 12

In this wiki article, we will learn how to change the TimeZone in Debian 12 using the timedatectl command.

Check your current TimeZone

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

timedatectl

Output:

root@vps:~# timedatectl
               Local time: Mon 2023-06-12 21:33:10 UTC
           Universal time: Mon 2023-06-12 21:33:10 UTC
                 RTC time: Mon 2023-06-12 21:33:11
                Time zone: Etc/UTC (UTC, +0000)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no
root@vps:~# 

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

cat /etc/timezone

Output:

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

Listing TimeZones

Using timedatectl command to list TimeZones,

timedatectl list-timezones

Output:

root@vps:~# 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@vps:~# timedatectl set-timezone America/New_York

Replace America/New_York with your actual TimeZone

To confirm your changes were applied by running the timedatactl command.

timedatectl

Output:

root@vps:~# timedatectl
               Local time: Mon 2023-06-12 17:45:41 EDT
           Universal time: Mon 2023-06-12 21:45:41 UTC
                 RTC time: Mon 2023-06-12 21:45:42
                Time zone: America/New_York (EDT, -0400)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no
root@vps:~# 

Done!


CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME for 10% off!

1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month

Available Locations: LAX | MIA | ATL | FRA | AMS