A new server usually runs in UTC. If you want the times in your logs, in your scheduled tasks and in your programs to match your own clock, set the time zone of your city. The clock itself keeps exact time by itself over the internet; this page also shows how to check that. The commands were tested on Ubuntu 26.04 LTS; run them as root.


1. Check the Time and the Time Zone

timedatectl

On a new server the answer looks like this:

               Local time: Sat 2026-11-28 10:20:05 UTC
           Universal time: Sat 2026-11-28 10:20:05 UTC
                Time zone: Etc/UTC (UTC, +0000)
System clock synchronized: yes
              NTP service: active

System clock synchronized: yes means that the clock is set over the internet.

2. Set Your Time Zone

Find the name of your time zone; the list has more than 400 entries, so filter it, for example for Europe:

timedatectl list-timezones | grep Europe

Then set it, for example:

timedatectl set-timezone Europe/Warsaw

timedatectl and date show the local time at once: Time zone: Europe/Warsaw (CET, +0100). Summer and winter time change by themselves.

  • Programs that are already running may keep the old time zone until they restart. Restart the ones that matter to you, for example systemctl restart cron for scheduled tasks.
  • Back to UTC: timedatectl set-timezone Etc/UTC. Many administrators keep servers in UTC on purpose, so that logs of servers in different countries are easy to compare.
ℹ On Debian 13

Debian sets the clock with systemd-timesyncd, not chrony, so steps 3 and 4 do not apply as written. After the installation it usually already uses the time server of the data center; timedatectl timesync-status shows the server and how far the clock is off (Offset). If you prefer chrony, apt install chrony replaces timesyncd; chrony then uses the Debian time servers instead of the data center's, and steps 3 and 4 work as described.

3. The Exact Clock: chrony

Ubuntu 26.04 keeps the clock exact with chrony. It asks the time servers of Ubuntu over an encrypted connection (NTS). To see how exact your clock is and which servers it uses:

chronyc tracking
chronyc sources

chronyc tracking shows, among others, System time : 0.000143601 seconds fast of NTP time: in this example the clock is a tenth of a millisecond off. In chronyc sources, the server marked with ^* is the one the clock follows now.

4. Another Time Server

Some data centers have their own time server, which is close to your server. Add it in a file of your own, so that updates of chrony do not overwrite it:

echo "server ntp.example.com iburst" > /etc/chrony/sources.d/local.sources
chronyc reload sources

The new server appears in chronyc sources after a few seconds; chrony then uses the best of all servers. To go back, delete the file and run chronyc reload sources again.

ℹ Older guides mention timesyncd

Older Ubuntu versions set the clock with systemd-timesyncd and its file /etc/systemd/timesyncd.conf. On Ubuntu 26.04 chrony does this job; settings in timesyncd.conf have no effect.


Good to Know


Related Guides

View all Ubuntu and Debian guides

Was this answer helpful? 161 Users Found This Useful (250 Votes)