Skip to main content
To set the time zone on Ubuntu, run sudo timedatectl set-timezone Europe/London (find the exact name with timedatectl list-timezones). The change applies straight away, without a reboot. Run timedatectl to check: it shows the new Time zone and System clock synchronized: yes when NTP time sync works. The same commands work on Debian, AlmaLinux and Rocky Linux.

Before you start

  • Connect with SSH as a sudo user. Root can leave out sudo.
  • Many servers run in UTC on purpose: logs from different servers line up and there are no daylight-saving jumps. Change the zone if your cron jobs, apps or logs should follow local time.

How to check the current time zone

Example output:

How to set the time zone

1

Find your time zone name

Names use the Region/City format.
2

Set it

3

Check it

To go back to UTC: sudo timedatectl set-timezone UTC.
Programs that are already running may keep the old zone until they restart, for example cron, PHP-FPM, MySQL/MariaDB and Java apps. Restart them with sudo systemctl restart <service> or reboot in a quiet period. PHP and MySQL also have their own time zone settings (date.timezone in php.ini, default-time-zone in MySQL).

How to turn on automatic time sync (NTP)

NTP (Network Time Protocol) keeps the clock correct by comparing it with time servers on the internet. A wrong clock breaks SSL certificates, two-factor codes and log timelines.
Ubuntu 24.04 and earlier use systemd-timesyncd by default. (Ubuntu 25.10 and later use chrony.)
If NTP service shows n/a, no time sync service is installed. Install one:
To use other time servers, create /etc/systemd/timesyncd.conf.d/ntp.conf:
Then restart it: sudo systemctl restart systemd-timesyncd.
Run only one time sync service. If you install chrony on Ubuntu or Debian, it replaces systemd-timesyncd.

How to check it worked

You should see your chosen Time zone, System clock synchronized: yes and NTP service: active. On AlmaLinux/Rocky, chronyc tracking shows Leap status : Normal and a small System time offset (for example a few microseconds). Right after you enable NTP, synchronized can show no for a minute while the first time servers answer.

Frequently asked questions

How do I change the time zone without timedatectl?

Point /etc/localtime at the zone file: sudo ln -sf /usr/share/zoneinfo/Europe/London /etc/localtime. On Ubuntu and Debian you can also run sudo dpkg-reconfigure tzdata and pick from a menu.

Why is my server clock wrong after a reboot?

NTP is off or blocked. Check timedatectl, enable NTP as above, and make sure outgoing UDP port 123 isn’t blocked by your own firewall.

Can I set the time by hand?

Only with NTP off: sudo timedatectl set-ntp false then sudo timedatectl set-time "2026-11-04 10:45:00". Turn NTP back on afterwards; a manual clock drifts.

Does the time zone affect cron jobs?

Yes. cron runs jobs in the server’s local time. See schedule tasks with cron.

VPS and dedicated server guides

Every server guide in one place.

Schedule tasks with cron

Run jobs at the right local time.

Change the hostname

Another first-day setting.

First 10 things on a new VPS

Set up a new server properly.

Checked against the official Ubuntu Server documentation on timedatectl and timesyncd, the timedatectl manual and the Red Hat Enterprise Linux 9 time synchronization guide on 4 November 2026. Our test container doesn’t run systemd, so these commands were not run there. Commands can differ on other distributions or releases.

Need Extra Help?

If you encounter any issues, our support team is ready to assist:

Save on Your Hosting

Ready to upgrade your hosting? Use code KB20 at checkout for 20% off your first order!

Last Updated: November 2026