How To Change TimeZone on CentOS Stream 10
In this wiki article, we will learn how to change the timezone in CentOS Stream 9 using the timedatectl
command.
Check your Current TimeZone
To get detailed information on your CentOS date, time, and timezone you use the timedatectl
command.
timedatectl
Output:
[root@vps ~]# timedatectl
Local time: Thu 2025-03-06 12:41:23 UTC
Universal time: Thu 2025-03-06 12:41:23 UTC
RTC time: Thu 2025-03-06 12:41:23
Time zone: UTC (UTC, +0000)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
[root@vps ~]#
The TimeZone configuration on CentOS Stream 9 OS is stored set by the /etc/localtime
file. This file is a symbolic link to a timezone file under /usr/share/zoneinfo
.
To get a basic view of the timezone you can ls the file to its a symbolic link.
ls -l /etc/localtime
Outout:
[root@vps ~]# ls -l /etc/localtime
lrwxrwxrwx. 1 root root 25 Feb 11 09:56 /etc/localtime -> ../usr/share/zoneinfo/UTC
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
Africa/Brazzaville
Africa/Bujumbura
Africa/Cairo
Africa/Casablanca
Africa/Ceuta
Africa/Conakry
Africa/Dakar
Africa/Dar_es_Salaam
Africa/Djibouti
Africa/Douala
Africa/El_Aaiun
Africa/Freetown
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 Australia/West
To confirm your changes were applied by running the timedatactl command.
timedatectl
[root@server ~]# timedatectl set-timezone Asia/Kolkata
[root@server ~]# timedatectl
Local time: Fri 2025-02-21 01:06:24 IST
Universal time: Thu 2025-02-20 19:36:24 UTC
RTC time: Thu 2025-02-20 19:36:24
Time zone: Asia/Kolkata (IST, +0530)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
Now you have successfully configured TimeZone on your CentOS Stream 10.
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