To change the timezone in Linux you need a single command: sudo timedatectl set-timezone Europe/Berlin. On our test system it took 5 milliseconds, and date showed the new time right away. That is not the end of it, though. What the usual quick guides leave out: running programs, the syslog daemon and above all cron either don’t notice the change at all or react in a way you won’t expect.
We measured this on December 4, 2026 in a throwaway container with full systemd (Ubuntu 24.04, systemd 255, Debian cron 3.0pl1-184, tzdata 2026f). Our real server kept running on UTC the whole time. Three results up front:
1. When switching from Europe/Berlin back to UTC, a cron job that was due in exactly that minute simply did not run. No error, no log line. Cron treated the hour as time it had “already lived through” and skipped fixed-time jobs for a full hour, including one we only created afterwards.
2. In the other direction (UTC → Berlin), a job that had been due an hour earlier ran as a catch-up at 09:05. Cron treats a timezone change exactly like a daylight saving jump.
3.
rsyslogkept writing +00:00 after the switch until we restarted it.journalctl, on the other hand, immediately showed everything in the new zone, including old entries. Two logs, two times for the same event.
If you only have a desktop, you can ignore most of this. If you run a server, read the sections on cron and logs before you hit enter.
Short video by HardReset_Pro (March 2026) showing the basic command. Everything that happens afterwards is below.
Change the timezone in Linux in 60 seconds
For everyone who just needs the command:
# 1. Look at the current setting
timedatectl
# 2. Find the right zone
timedatectl list-timezones | grep -i new_york
# 3. Set it (needs root)
sudo timedatectl set-timezone America/New_York
# 4. Check
timedatectl
date
On a server, add two lines that almost no guide mentions:
sudo systemctl restart cron rsyslog
Why exactly these two is shown in the measurements further down. Programs you run yourself (Node, Python, PHP-FPM, databases) also need a restart if they are supposed to print local times.
And the most important decision comes before the command: does the server need a local timezone at all? For most servers our answer is no. More on that shortly.
What is the timezone in Linux, really?
Internally, Linux doesn’t count clock times. It counts seconds since January 1, 1970, 00:00 UTC. That number is the same everywhere on Earth. The timezone is just the translation table that turns this number into a readable time. When you change the timezone, the clock doesn’t run faster or slower, and no time gets shifted. Only the display changes.
That explains why the switch is so fast and why it still has side effects: every program that shows times or schedules things has to reread the translation table. Some do that on every call, some once at startup and never again.
The tables live in /usr/share/zoneinfo/ and come from the tzdata package. They don’t just contain the offset from UTC for each region, but its whole history: when daylight saving started there, when governments changed the rules. We had tzdata 2026f installed, with 497 zones, 61 of them in Europe.
On Debian, Ubuntu, Fedora and Arch the configured zone is a single symlink:
$ ls -l /etc/localtime
/etc/localtime -> /usr/share/zoneinfo/Europe/Berlin
At its core, timedatectl does nothing more than repoint this link.

Show the current timezone: timedatectl, date and /etc/localtime
Before changing anything, check what’s set. On our server it looked like this:
$ timedatectl
Local time: Fri 2026-12-04 08:01:48 UTC
Universal time: Fri 2026-12-04 08:01:48 UTC
RTC time: Fri 2026-12-04 08:01:48
Time zone: Etc/UTC (UTC, +0000)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
What the lines mean:
- Local time: the time in the configured zone.
- Universal time: the same moment in UTC.
- RTC time: the hardware clock on the motherboard. Containers and many VMs show
n/ahere. - Time zone: zone name plus current abbreviation and offset from UTC.
- System clock synchronized / NTP service: whether the clock is synced via NTP. That’s a different topic from the timezone, and a more important one: a wrong zone only shifts the display, an unsynced clock is actually wrong.
- RTC in local TZ: whether the hardware clock runs in local time. On Linux servers this should say
no.
Without timedatectl (in a slim container, for example) these help:
date # time with abbreviation, e.g. "CET"
date +%Z%z # just abbreviation and offset: CET+0100
readlink /etc/localtime
Debian and Ubuntu also still have a file called /etc/timezone. Don’t rely on it. You’ll see why in a moment.
Change the timezone with timedatectl (Ubuntu, Debian, Fedora, Arch)
The command is the same on every systemd distribution:
sudo timedatectl set-timezone Europe/Berlin
Measured on December 4, 2026:
| What | Result |
|---|---|
| Command duration | 5 ms |
| Symlink afterwards | /etc/localtime -> /usr/share/zoneinfo/Europe/Berlin |
date right after | Fri Dec 4 09:03:20 CET 2026 |
/etc/timezone afterwards | still Etc/UTC |
Typo Europe/Berln | Invalid or not installed time zone, exit code 1 |
| As a normal user | Access denied, exit code 1 |
Abbreviation CET | accepted, exit code 0 |
Two of these rows matter.
/etc/timezone stays behind. timedatectl only repoints the symlink. The old text file with the zone name is left untouched. In our test it still said Etc/UTC while the system was already running on Berlin time. Some older programs and scripts read exactly this file. If you don’t need it, ignore it. If a program does need it, write it yourself:
echo "Europe/Berlin" | sudo tee /etc/timezone
CET is a valid zone, but the wrong one. timedatectl accepted the abbreviation without complaint. CET is a real file in tzdata, but it encodes a single rule, not a country’s history. For the present it usually calculates the same as Berlin; for historical dates and future rule changes it doesn’t. Always use the Continent/City form: Europe/Berlin, America/New_York, Asia/Tokyo.
Finding the right timezone
timedatectl list-timezones # all 497
timedatectl list-timezones | grep -i chicago # targeted
timedatectl list-timezones | grep '^America/' # by region
There is no zone called “EST” that does what most people expect, and no zone named after a country. The US East Coast is America/New_York, the UK is Europe/London, Germany is Europe/Berlin. The city-based names exist because regions that share an offset today often had different rules in the past.
Interactively with dpkg-reconfigure
Debian and Ubuntu also offer the menu route:
sudo dpkg-reconfigure tzdata
It asks for region and city. It’s awkward in scripts, and one detail surprised us: we wrote Europe/Berlin into /etc/timezone and then ran dpkg-reconfigure -f noninteractive tzdata, as older guides recommend. Result on Ubuntu 24.04: the system stayed on UTC, and /etc/timezone was even rewritten to Etc/UTC. The configuration read the existing symlink, not the file. For scripts, timedatectl set-timezone is the reliable way.
Change the timezone without timedatectl
Containers, Alpine and systems without systemd have no timedatectl. Then you set the symlink yourself:
sudo ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime
That works immediately, and date shows the new zone. We measured two traps.
timedatectl doesn’t notice right away. On a systemd system, the background service systemd-timedated was still running when we manually pointed the link to Asia/Tokyo. date showed Japanese time, timedatectl kept reporting Etc/UTC. Only after the service exited (it does so on its own after a short idle period) was the output correct. If you switch by hand and check with timedatectl right away, you may get a stale answer.
Copying instead of linking. Some guides copy the zone file to /etc/localtime. date works (for us, correctly CET), but timedatectl then just shows Time zone: n/a, because it reads the name from the link target. A copy also stays on the old data when tzdata is updated. Link it instead.
And if /etc/localtime is missing entirely, everything silently falls back to UTC, without a warning.
For one command or one user: the TZ variable
Sometimes you don’t want to change the system zone at all, just see output in another zone:
TZ=Europe/Berlin date
TZ=America/New_York date
For one user permanently, put export TZ=Europe/Berlin into ~/.bashrc or ~/.profile. There’s a nasty trap here: TZ doesn’t validate anything. We tried three typos:
| Input | Output of date |
|---|---|
TZ=Europe/Berlin | 09:03:20 CET |
TZ=Europe/Berln | 08:03:20 Europe (UTC, with nonsense as abbreviation) |
TZ=Berlin | 08:03:20 Berlin (UTC) |
No error, no exit code, just a wrong time with an abbreviation that looks plausible enough to slip through. When you set a TZ variable, check the result with date +%Z and make sure you see a real abbreviation like CET, EST or PDT.
The Etc/GMT zones are even more confusing. Their sign is reversed: TZ=Etc/GMT+1 date gave us 07:03, one hour behind UTC. Etc/GMT-1 is what you’d intuitively call “GMT plus one”. This isn’t a bug but an old POSIX convention. Only use these zones if you know exactly why.
Should a server run on UTC or local time?
Here’s our opinion, and it’s a firm one: servers belong on UTC.
This isn’t theory. We run servers in Germany and Finland, and all of them are on UTC. When a problem spans several machines, every log shows the same times. Nobody has to work out whether an entry from Helsinki is one or two hours ahead of one from Nuremberg. Our guide to setting up a Linux server makes the same recommendation.
The reasons in detail:
- No daylight saving. UTC never shifts. There is no missing hour and no hour that happens twice. Every problem from the daylight saving section below disappears.
- Unambiguous logs. An entry at 01:30 on the November night the US clocks fall back is ambiguous in New York time. In UTC it never is.
- Databases and APIs calculate in UTC anyway. If you store timestamps without a zone and the server runs on local time, you’ll eventually have two kinds of data in the same column.
- Cloud images start on UTC. Hetzner, AWS, DigitalOcean and most Docker images ship with
Etc/UTC. If you change nothing, everything matches.
Local time makes sense on desktops and laptops, on single servers that serve people in one zone whose logs are read by non-technical staff, and for programs that use the system time for display and can’t be configured otherwise.
The better solution for humans is almost always: server on UTC, display in local time. A dashboard, invoice or email can convert when it renders. For you as an admin, an alias is enough:
alias now='TZ=America/New_York date'
What happens after the switch: our measurements
Now for the part the quick guides skip. We started a fresh Ubuntu 24.04 container with full systemd, ran cron, rsyslog, a Python program and a Node program inside, and switched the zone back and forth.
Running programs stay in the old zone
A Python script and a Node script printed the time every second. We switched from UTC to Berlin and waited three seconds:
py 08:03 UTC 08:03 UTC
node 08:03:35 GMT+0000 (Coordinated Universal Time)
Both kept running in UTC. Programs read the zone file once at startup and keep it. That applies to almost anything long-running: web servers, PHP-FPM, Java applications, databases. You need to restart them for correct output. PostgreSQL and MySQL also have their own timezone setting inside the database that is independent of the system.
Syslog stays old, journalctl converts immediately
We wrote one message with logger right before and one right after the switch. In /var/log/syslog (rsyslog):
2026-12-04T08:03:54.845941+00:00 ... root: vorher-utc
2026-12-04T08:03:55.854902+00:00 ... root: nachher-berlin
Both with +00:00, although the system was already on Berlin for the second line. rsyslog only wrote +01:00 after systemctl restart rsyslog.
journalctl behaves differently. It stores UTC internally and converts on every display:
$ journalctl -o short | grep -E "vorher|nachher"
Dec 04 09:03:54 ... root[212]: vorher-utc
Dec 04 09:03:55 ... root[215]: nachher-berlin
The old message now shows 09:03 too, although it was written at 08:03 under UTC. That’s correct, but it can confuse you during troubleshooting: the same message says 08:03 in /var/log/syslog and 09:03 in journalctl. Use journalctl --utc to see UTC, or -o short-iso to see the offset as well. Our logrotate guide covers more about log files.

Cron: one job runs as a catch-up, another one vanishes
This is the most important finding. Cron on Debian and Ubuntu (classic Vixie cron with Debian patches) has a built-in rule for clock changes. From the cron(8) man page:
If the time has moved forwards by less than 3 hours, jobs that would have run in the skipped time are run soon after the change. If it has moved backwards by less than 3 hours, jobs that fall into the repeated time are not re-run. Jobs with
*in the hour or minute field are not affected.
Cron doesn’t distinguish between daylight saving starting and you changing the timezone. For cron, local time jumped, period. We tried both directions.
UTC → Berlin (clock jumps one hour forward). Cron was running under UTC, then we switched to Berlin (local time 09:04) and created two jobs: one for 08:06 (the UTC hour) and one for 09:06 (the Berlin hour).
09:05:01 CET CMD (date >> /tmp/cron-utc-stunde.log)
09:06:01 CET CMD (date >> /tmp/cron-berlin-stunde.log)
Both ran. The 08:06 job fell into the “skipped” hour and was caught up at 09:05. So if you switch a server from UTC to a zone ahead of UTC in the afternoon, every job scheduled within that last hour of local time runs again immediately. Annoying for a backup, worse for a billing run.
Berlin → UTC (clock jumps one hour back). The other way: cron was running under Berlin, local time 09:07. We created a job for 09:09 (Berlin) and one for 08:09 (UTC) and switched back to UTC at 09:08 local time. New local time: 08:08.
/tmp/cron-b-jedeminute.log:
09:08:01 CET
08:09:01 UTC
/tmp/cron-b-berlinstunde.log: (missing)
/tmp/cron-b-utcstunde.log: (missing)
The every-minute job kept running. The 09:09 job couldn’t run, because 09:09 local time only came around again an hour later. But the 08:09 job didn’t run either, even though the clock showed exactly 08:09. To cron, 08:09 was a minute from the repeated hour, and it skips those.
It gets worse: at 08:10 we added a new job for 08:12 to a user crontab. That one didn’t run either. Cron suppresses fixed times until local time catches up to where it was before the jump, so for a full hour. Only after systemctl restart cron did a freshly created job run on time.
The rule is simple: run systemctl restart cron after every timezone change, and look at the crontab beforehand to see which jobs fall within the hour around the switch. The safest approach is to switch during a maintenance window with no fixed jobs due. Cron syntax, environment and logging are covered in our guide to creating a cron job.
CRON_TZ and TZ in the crontab
Some guides recommend setting a zone just for the crontab instead of the system:
CRON_TZ=America/New_York
0 8 * * * /path/report.sh
This works with cronie (Fedora, RHEL, Rocky, Alma). On Debian and Ubuntu nothing happens. We tested it: a job with CRON_TZ=Europe/Berlin for 09:15 Berlin time should have run at 08:15 UTC on the UTC server. It didn’t run. Cron treated the line as an ordinary environment variable and kept reading the schedule in UTC. The Debian cron man page doesn’t mention CRON_TZ at all.
TZ=Europe/Berlin in the crontab does have an effect on Debian, but only on the command, not on the schedule: a job for 08:15 ran at 08:15 UTC, and date inside printed 09:15:01 CET. Handy if a script needs local time in a file name, but no solution for “report at 8 am local time”.
If you want to schedule a job in local time without changing the server, systemd timers are the clean way.
systemd timers with a timezone
Current systemd versions (255 in our test) accept a zone at the end of OnCalendar=:
[Timer]
OnCalendar=*-*-* 08:00 Europe/Berlin
Persistent=true
You can check it without installing anything:
$ systemd-analyze calendar --iterations=3 "*-*-* 08:00 Europe/Berlin"
Normalized form: *-*-* 08:00:00 Europe/Berlin
Next elapse: Sat 2026-12-05 07:00:00 UTC
Iteration #2: Sun 2026-12-06 07:00:00 UTC
08:00 Berlin in winter = 07:00 UTC. In summer systemd automatically shifts to 06:00 UTC, while the system zone stays on UTC. How to turn a script into a service with a timer is shown in our guide to creating a systemd service.
Daylight saving: the hour that’s missing and the one that happens twice
If you run a server on local time, you have to expect gaps twice a year. zdump gives you the exact dates:
$ zdump -v -c 2026,2028 Europe/Berlin | grep 2027
Sun Mar 28 00:59:59 2027 UT = Sun Mar 28 01:59:59 2027 CET isdst=0
Sun Mar 28 01:00:00 2027 UT = Sun Mar 28 03:00:00 2027 CEST isdst=1
Sun Oct 31 00:59:59 2027 UT = Sun Oct 31 02:59:59 2027 CEST isdst=1
Sun Oct 31 01:00:00 2027 UT = Sun Oct 31 02:00:00 2027 CET isdst=0
On March 28, 2027, 01:59:59 is followed directly by 03:00:00 in Germany. On October 31, 2027, the time between 02:00 and 02:59 happens twice. (In the US the dates differ, but the pattern is the same.) What do programs do with a time that doesn’t exist, or exists twice? We asked four:
| Input in Europe/Berlin | GNU date | Python 3.12 zoneinfo | Node 18 | systemd 255 timer |
|---|---|---|---|---|
| 2027-03-28 02:30 (doesn’t exist) | error, exit 1 | 02:30+01:00 (invented time) | 03:30 CEST | day skipped, next run March 29 |
| 2027-10-31 02:30 (exists twice) | 02:30 CET (the second) | 02:30 +02:00 (the first) | 02:30 CEST (the first) | once, the first time |
Four programs, four answers. Most striking: the systemd timer for “every day 02:30 Berlin” didn’t fire at all on March 28; the next run was scheduled for March 29. Python builds a time that never existed, and GNU date and Python disagree about which of the two 02:30s you meant.
Debian cron behaves as described above: jobs from the missing hour in spring are caught up at 03:00, jobs from the doubled hour in autumn run once. That’s sensible, but other cron implementations behave differently, and programming languages differ again.
The simple rule: on servers running local time, don’t schedule important jobs between 02:00 and 03:00. The better rule: put the server on UTC, and the problem doesn’t exist.

Video by Nooe Hack (November 2026) on the dual-boot hardware clock problem explained in the next section.
Hardware clock, dual boot and “RTC in local TZ”
The RTC in local TZ line in timedatectl mostly matters on desktops. Linux expects the motherboard clock (RTC) to run in UTC. Windows sets it to local time by default. If you dual-boot, you’ll see an offset of several hours after every switch.
There are two fixes. Put Linux on local time:
sudo timedatectl set-local-rtc 1
timedatectl then explicitly warns that this mode causes problems with daylight saving changes. It’s better to switch Windows to UTC (registry key RealTimeIsUniversal), as the video above shows. On servers and VMs: leave RTC in local TZ: no.
To be clear: the hardware clock is not the timezone. You can change the zone as often as you like without touching the RTC, and vice versa.
Timezone in Docker containers
Containers have their own /etc/localtime. Whatever is set on the host doesn’t reach them. Measured with the images we had locally:
| Container | Result |
|---|---|
alpine:latest, nothing set | UTC |
alpine:latest with -e TZ=Europe/Berlin | UTC, no warning |
alpine:latest with -v /usr/share/zoneinfo/Europe/Berlin:/etc/localtime:ro | CET |
alpine:latest with -e TZ='CET-1CEST,M3.5.0,M10.5.0/3' | CET |
node:22-bookworm-slim with -e TZ=Europe/Berlin | CET (in Node too) |
postgres:16-alpine | UTC, zone files present |
The Alpine case is the classic trap: the base image contains no tzdata, so there’s no Europe/Berlin file, and the TZ variable silently does nothing. If you need Alpine on local time, add apk add --no-cache tzdata to your Dockerfile (one more package you’d otherwise like to save in a small Docker image), mount the file from the host, or use a POSIX rule as in row 4. Debian-based images like node:22-bookworm-slim ship tzdata, so the variable is enough there.
In Docker Compose it looks like this:
services:
app:
image: node:22-bookworm-slim
environment:
- TZ=America/New_York
More on compose files in our Docker Compose example. Our recommendation is the same as for the host: leave containers on UTC and convert only for display. If you do need it, check after startup with docker exec CONTAINER date that it really says your zone and not UTC.
Timezone and programming languages
The system zone is only the default. Almost every language and database can override it:
- PHP:
date.timezoneinphp.ini. If empty, PHP uses UTC, not the system zone. - Node.js: reads
TZat startup. Changingprocess.env.TZat runtime works in newer versions, but don’t rely on it. - Python:
zoneinfo.ZoneInfo("America/New_York")instead of the system zone when it must be explicit. - PostgreSQL:
timezoneinpostgresql.confor per session withSET TIME ZONE 'Europe/Berlin'. Columns of typetimestamptzstore UTC internally. - MySQL/MariaDB:
default-time-zoneplus the zone tables, which you first have to load withmysql_tzinfo_to_sql.
That’s also why changing the zone on the server sometimes “does nothing”: the application has its own setting and ignores the system.

Checklist: changing the timezone on a server
- Do you really need it? If only the display bothers you, keep the server on UTC and convert in the application.
- Read the crontabs:
crontab -lfor every user and/etc/cron.d/. Which jobs run in the hour before and after the planned switch? - Switch:
sudo timedatectl set-timezone Europe/Berlin - Check:
timedatectlanddate +%Z. Do you see a real abbreviation? - Restart cron and syslog:
sudo systemctl restart cron rsyslog - Restart your own services that print or schedule times.
- Update
/etc/timezoneif needed (Debian/Ubuntu only, and only if a program reads it). - Check the next day that all fixed cron jobs ran, for example with
journalctl -u cron --since yesterday.
Frequently asked questions about the Linux timezone
How do I change the timezone in Linux?
With sudo timedatectl set-timezone Europe/Berlin (or your zone). On systems without systemd, set the symlink yourself: sudo ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime. Then restart cron, syslog and your own services.
How do I find out which timezone is set?
timedatectl shows it in the Time zone line. Without systemd, use date +%Z%z and readlink /etc/localtime. The file /etc/timezone can be out of date, and in our test it was.
What is the correct name for my timezone in Linux?
Use the Continent/City form: America/New_York, Europe/London, Europe/Berlin, Asia/Tokyo. Avoid abbreviations like CET or EST. timedatectl accepts some of them, but they don’t encode a region’s history and rule changes.
Do I have to reboot after changing the timezone?
No, a full reboot isn’t necessary. But programs that read the zone at startup keep running in the old one. At minimum restart cron and rsyslog, plus your own services.
How do I change the timezone on Ubuntu?
Exactly as above: sudo timedatectl set-timezone Europe/Berlin. The menu route sudo dpkg-reconfigure tzdata also works but is unsuitable for scripts. In non-interactive mode it ignored /etc/timezone in our test.
What happens to cron jobs when I change the timezone?
Debian cron treats the change like a daylight saving jump. If local time moves forward, jobs from the skipped hour are caught up. If it moves back, cron suppresses fixed-time jobs for an hour. In our test that meant a job didn’t run at all. Run systemctl restart cron after the switch.
Should a server run on UTC or local time?
On UTC unless there’s a compelling reason not to. UTC has no daylight saving, logs are unambiguous, and servers in different countries show the same times. Local time belongs in the display.
Does CRON_TZ work on Ubuntu?
No. The Debian cron used by Ubuntu and Debian doesn’t know CRON_TZ. We tested it: the job didn’t run at all. cronie on Fedora and RHEL supports the variable. On Ubuntu, use a systemd timer with OnCalendar=... Europe/Berlin for local-time jobs.
Why does my Docker container show the wrong time?
Usually it shows the right time, just in UTC. Containers don’t inherit the host’s zone. Set TZ=Europe/Berlin (or your zone). On Alpine images you also need to install tzdata, or the container silently stays on UTC.
Does changing the timezone actually change the time?
No. The system clock counts seconds in UTC; the timezone only changes how that becomes a readable time. A genuinely wrong time comes from missing time synchronization. Check the System clock synchronized line in timedatectl for that.
What does “RTC in local TZ” mean?
Whether the motherboard’s hardware clock runs on local time. Servers should show no. On dual-boot machines with Windows, this is where the well-known offset comes from. The best fix is to switch Windows to UTC.
Can I change the timezone for just one user?
Yes, with export TZ=Europe/Berlin in ~/.bashrc or ~/.profile. Check with date +%Z afterwards, because a typo in TZ produces no error, just a silent UTC time with a wrong abbreviation.
Conclusion: changing the timezone in Linux is one command, the consequences are more
The command itself is trivial: timedatectl set-timezone finished in 5 milliseconds. The real work is in everything that read the time before the switch. In our test, cron caught up one job and swallowed another, rsyslog kept writing in the old zone, and running programs didn’t notice the change at all.
So our advice stands: keep servers on UTC and use local time only for display. If you do have to switch, check the crontab first, run systemctl restart cron rsyslog right after, and take a look the next morning. If you’re setting up a new server right now, the remaining basics are in our guide to setting up a Linux server.
