When you set up a Linux server, it is worth running date once before anything else to confirm the current time and time zone. A badly configured system time zone can throw off log timestamps, make scheduled jobs fire early or late, and even leave the database and the web page showing different times.
Checking the time zone on Linux is not difficult. What matters is keeping three things apart: the system time, the UTC offset, and the actual time zone name in use.

Run this in the terminal:
dateSample output:
Wed Dec 2 15:20:59 CST 2026The CST here does not pin down which time zone the machine is in, since China Standard Time and US Central Standard Time both use that abbreviation. A more reliable approach is to print the UTC offset alongside the time:
date +"%Y-%m-%d %H:%M:%S %Z %z"Sample output:
2026-12-02 15:20:59 CST +0800The +0800 here means local time runs 8 hours ahead of UTC. On its own, though, it still cannot identify a specific regional time zone.
These are the commands most often used to query time on Linux:
| Command | What it shows |
|---|---|
date | Current system time |
date +%Z | Time zone abbreviation |
date +%z | UTC offset |
date -u | UTC time |
date -R | Output in RFC 2822 format |
date --iso-8601=seconds | Output in ISO 8601 format |
GNU date renders the ISO 8601 offset as +08:00, which means the same thing as +0800. Keep that format difference in mind when you write scripts.
On a Linux system running systemd, just run:
timedatectlThe output covers local time, UTC time, the hardware clock, the time zone name, and NTP sync status. Time zone confirms the exact zone the system is configured for, while System clock synchronized gives you a read on how the clock is keeping time.
If all you need is the time zone name:
timedatectl show -p Timezone --valuetimedatectl list-timezonessudo timedatectl set-timezone Asia/ShanghaiSome Docker containers and minimal Linux images do not run systemd. An error from timedatectl there does not mean the system clock is wrong — use date instead, or inspect the time zone configuration files directly.
On Linux, the system time zone is normally determined by /etc/localtime. That file may be a symbolic link, or it may be a straight copy of the zone data file.
ls -l /etc/localtimereadlink -f /etc/localtimeIf it returns a path like this:
/usr/share/zoneinfo/Asia/Shanghaithen the system's time zone file points at Shanghai.
On some Debian-based distributions you can also read the recorded zone name with cat /etc/timezone, though that file does not necessarily match the configuration actually in effect.
When you are chasing down odd application timestamps, do not overlook the TZ environment variable:
printenv TZTZ=UTC dateTZ=Asia/Shanghai dateA TZ set for a single process overrides the default time zone that process uses without touching the system-wide configuration. Some minimal images also need tzdata installed before regional zone names resolve correctly.
The UTC offset is not always fixed. New York is a good example: winter and summer use different offsets.
On a system with GNU date and the relevant time zone data installed, you can run:
TZ=America/New_York date -d '2026-01-01 12:00:00' '+%Z %z'
# EST -0500TZ=America/New_York date -d '2026-07-01 12:00:00' '+%Z %z'
# EDT -0400You can also use zdump to look at the transition records:
zdump -v -c 2026,2027 America/New_YorkFor historical logs, time conversion across regions, or scheduled jobs, a full IANA time zone name is the safer choice than a hard-coded UTC offset.
A Linux server you reach over SSH may run on UTC while your local machine is set to Asia/Shanghai. Server logs and a web page then show times 8 hours apart, and that does not mean the server clock is misconfigured.
Open the browser developer tools and run this in the console:
Intl.DateTimeFormat().resolvedOptions().timeZonenew Date().getTimezoneOffset()The first returns the time zone name the browser is using; the second returns the offset in minutes between the current time and UTC. Mind the sign: JavaScript reports UTC+8 as -480.
When running code is not convenient, ToDetect's online time zone checker shows the browser time zone, the UTC offset, and IP-based location information, which you can line up against the output from the Linux commands.
A browser time zone that does not match the zone inferred from your IP location is not necessarily a configuration error. Remote work, a shared corporate egress, and travel can all produce that mismatch.
No. Changing the time zone mainly affects how time is converted and displayed, and does not change the Unix timestamp itself.
Check first whether the application has its own time zone setting, and whether the process has TZ set. Some applications cache time zone information and only read the new configuration after a restart.
A common cause is an application logging in UTC while the system displays time in UTC+8. Check the time zone configuration of the logging framework, the database, and the application separately before you reach for the system clock.
Efficiently solve multi-account management, environment isolation, and account security