Skip to content

How to Check and Change the Timezone on AlmaLinux, Rocky Linux, RHEL and Fedora (timedatectl)

Updated 5 min read

Updated: 8 October 2026 · Applies to: AlmaLinux 10.2 (systemd 257, cronie 1.7.0), Rocky Linux 9.8 (systemd 252, cronie 1.5.7) and Fedora 44 (systemd 259); legacy note for CentOS 7 and 6

To check the server timezone on AlmaLinux, Rocky Linux, RHEL or Fedora, run timedatectl and read the Time zone line. To change it, run sudo timedatectl set-timezone with a name from timedatectl list-timezones. The change is immediate and needs no reboot:

timedatectl
timedatectl list-timezones | grep -i kolkata
sudo timedatectl set-timezone Asia/Kolkata

Check the current timezone

$ timedatectl
               Local time: Thu 2026-10-08 12:03:20 IST
           Universal time: Thu 2026-10-08 06:33:20 UTC
                 RTC time: n/a
                Time zone: Asia/Kolkata (IST, +0530)
System clock synchronized: yes
              NTP service: n/a
          RTC in local TZ: no

Time zone shows the name, the abbreviation and the offset from UTC. This is an AlmaLinux 10 test container, which has no hardware clock or time service, so RTC time and NTP service show n/a; a VPS or dedicated server shows real values. For one-line checks in scripts, PHP or MySQL, see how to check the timezone in Linux.

Change the timezone

  1. Find the exact name. Names are Region/City and case-sensitive:
    $ timedatectl list-timezones | grep -i kolkata
    Asia/Kolkata
    For UTC, use UTC.
  2. Set it. No output means success; a wrong name is refused:
    $ sudo timedatectl set-timezone Asia/Kolkatta
    Failed to set time zone: Invalid or not installed time zone 'Asia/Kolkatta'
    $ sudo timedatectl set-timezone Asia/Kolkata
  3. Check the result. The command points /etc/localtime at the zone file:
    $ ls -l /etc/localtime
    lrwxrwxrwx 1 root root 34 Oct  8 12:12 /etc/localtime -> ../usr/share/zoneinfo/Asia/Kolkata
    $ date
    Thu Oct  8 12:12:20 IST 2026
  4. Restart the services that need it (see "After the change" below).

There is no /etc/timezone and no /etc/sysconfig/clock on AlmaLinux 10, Rocky Linux 9 or Fedora 44; /etc/localtime is the only setting.

Zone names and the tzdata package

The zone files come from the tzdata package (rpm -q tzdata showed 2026c on AlmaLinux 10.2 and Fedora 44, 2026a on Rocky Linux 9.8). Unlike Debian and Ubuntu, these systems keep the old alias names in the main package: timedatectl list-timezones listed 598 names on all three, and Asia/Calcutta and US/Eastern were accepted without extra packages. Prefer the current names (Asia/Kolkata, America/New_York) anyway.

Governments change daylight saving rules from time to time, and those changes arrive as tzdata updates through a normal sudo dnf upgrade. If a valid name is refused because its file is missing, reinstall the package with sudo dnf reinstall tzdata.

UTC or local time?

Many administrators keep servers on UTC, so logs from several servers line up and daylight saving changes cause no gaps or repeated hours; cPanel recommends UTC too. If your team reads logs in local time, use the local zone. Either works if every service agrees.

Keep the clock accurate with chrony

The timezone only changes how the time is displayed; the clock itself runs in UTC and is kept correct by chronyd, the time service on the RHEL family. sudo timedatectl set-ntp true enables and starts it (according to the timedatectl manual, it starts the first available time service, which on AlmaLinux 10 is chronyd.service). Check it with chronyc tracking and chronyc sources. Setup and troubleshooting: how to synchronise time with NTP and configure an NTP server and clients with chrony.

After the change

  • cron (cronie): restart it. Run sudo systemctl restart crond. In our tests on AlmaLinux 10 (cronie 1.7.0) and Rocky Linux 9 (cronie 1.5.7), crond kept using the old zone after timedatectl set-timezone. We changed the zone from UTC to Asia/Kolkata with two jobs waiting: the one set for 48 06 * * * (06:48 UTC) ran at 12:18 IST, and the one set for 18 12 * * * did not run. After a restart, jobs ran at the new local time. This is different from Debian and Ubuntu, where cron followed the change by itself. To run one crontab in a fixed zone, cronie also accepts a CRON_TZ= line, according to its crontab manual.
  • PHP. PHP uses its own date.timezone setting (UTC by default), not the system zone. See set the default timezone in PHP.
  • MariaDB and MySQL. They read the system zone when they start; restart them with sudo systemctl restart mariadb (or mysqld).
  • Logs. journalctl shows all entries in the current zone; text log files keep the times they were written with, so they jump at the moment of the change.

cPanel servers

On a server with cPanel and WHM, you can also use WHM » Server Configuration » Server Time: choose the zone and click Change TimeZone. According to cPanel, the server time must be correct for the licence check, and a reboot afterwards makes sure every service uses the new zone. See setting the time zone via WHM.

Legacy: CentOS 7 and CentOS 6

CentOS Linux 7 and 6 are end of life and get no security updates, including tzdata updates, so move such servers to AlmaLinux or Rocky Linux. On CentOS 7, the same timedatectl list-timezones and set-timezone commands work, according to the Red Hat Enterprise Linux 7 documentation. CentOS 6 has no timedatectl: according to the Red Hat Enterprise Linux 6 documentation, /etc/localtime is a copy of the zone file and /etc/sysconfig/clock records its name in a ZONE= line, which the date and time tool maintains.

On Debian or Ubuntu, see how to check and change the timezone on Debian and Ubuntu.

Related services

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Unmanaged dedicated servers

full root access and free IPMI KVM, with Free Basic Managed Support.

Linux server management

hardening, patching, monitoring and automation for Ubuntu, Debian, RHEL and AlmaLinux.

Was this answer helpful?

Still stuck? Open a ticket