Skip to content
Log In Sign Up info@muvcloud.com

Check the Current Time Zone

timedatectl

The output shows the local time, the universal time (UTC), the hardware clock time, the Time zone line with the zone name and its offset, and whether the system clock is synchronized. A fresh cloud server usually reports Etc/UTC. These steps are written for the current Ubuntu LTS releases; the same commands work on Debian, and on AlmaLinux and Rocky Linux as well.

Find the Zone Name

Time zones have names in the form Region/City. List them all, or filter the list:

timedatectl list-timezones
timedatectl list-timezones | grep -i europe

The list opens in a pager; press q to leave it. Use a city name, not an abbreviation such as EST: the city zones know the daylight saving rules for their region.

Set the Time Zone

sudo timedatectl set-timezone America/New_York

Run timedatectl again to confirm. The command points the /etc/localtime link at the right zone file, which is where the system reads the zone, so nothing else has to be edited. To go back to UTC:

sudo timedatectl set-timezone Etc/UTC

Should a Server Use UTC?

UTC is a sound choice for servers, and many administrators keep it everywhere:

  • No daylight saving jumps: in a local zone one hour repeats in autumn and one is skipped in spring, which can run a cron job twice or not at all.
  • Logs line up: servers in different regions write comparable timestamps.
  • Applications convert anyway: websites and databases usually store UTC and show local time to each visitor.

A local zone is reasonable when people read logs and schedule jobs in local time and all of them work in that zone. Pick one approach and use it on every server.

The Interactive Alternative

sudo dpkg-reconfigure tzdata

On Debian and Ubuntu this opens a menu where you choose a region and then a city. The result is the same as with timedatectl.

Check Clock Synchronization

The time zone only changes how the time is shown. The clock itself must also be correct. In the timedatectl output, look for the line that says the system clock is synchronized, with the value yes, and an NTP service that is active. If it says no, turn network time on:

sudo timedatectl set-ntp true

Ubuntu 25.10 and later use chrony as the time service on new installations; chronyc tracking shows its state in detail. If synchronization still fails, check that a firewall does not block outgoing NTP traffic on UDP port 123. Chrony on current Ubuntu also uses NTS, which needs outgoing TCP port 4460 as well.

Effect on Cron and Logs

  • Cron: jobs run by the system time zone. Restart cron after the change so it uses the new zone: sudo systemctl restart cron on Debian and Ubuntu, sudo systemctl restart crond on AlmaLinux and Rocky Linux. Then check the times in your crontab.
  • Logs: journalctl shows entries in the current local zone, including older ones, because the journal stores time stamps independent of the zone. Add --utc to see UTC. Plain text logs keep the times they were written with, so entries before and after the change can be an offset apart.
  • Running services: many programs read the zone when they start. Restart web servers, application workers, and databases, or reboot the server during a quiet period.

Application Time Zones

Databases, language runtimes, and frameworks often have their own time zone setting that overrides the system one. If an application still shows the old time after a restart, check its configuration. For a single command or script, the TZ variable sets the zone for that process only:

TZ=Asia/Tokyo date

More on such variables is in how to set environment variables in Linux.

Troubleshooting

  • Invalid or unknown time zone: the name is misspelled or the case is wrong. Copy it from list-timezones.
  • The list is empty: the tzdata package may be missing on a minimal image; install it with sudo apt install tzdata.
  • Time is off by minutes: that is a synchronization problem, not a time zone problem.

Updated:

Linux VPS with Full Root Access

MUVCloud cloud servers run on KVM with Enterprise NVMe SSD storage and full root access, in Turkey, the Netherlands, and the USA.

Cloud VPS Plans Starting at2.99 $/mo Cheap Linux VPS

No Limits on Service or Support

You are not on your own as your projects grow. Our support engineers are ready 24/7, on several channels, whenever you need them.

Support specialist
  • 100% customer satisfaction goal
  • Our own hardware
  • 24/7 ticket and email support
  • 4 countries with locations