Time zone
lastmod 2025-06-12created 2020-08-2111 edits
A time zone is a dividing line of time devised to artificially adjust for the time difference between regions relative to the Royal Observatory, Greenwich in the UK (prime meridian, longitude 0°), in other words, the difference in day and night between regions caused by the Earth's rotation. Time zones are expressed as a relative offset from Coordinated Universal Time (UTC).
Categories
KST (Korea Standard Time)
KST (Korea Standard Time) equals UTC plus 9 hours.
Debian: noninteractive tzdata install
#!/bin/bash
export DEBIAN_FRONTEND=noninteractive
ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime
apt-get install -y tzdata
dpkg-reconfigure --frontend noninteractive tzdata
How to change the time zone on Linux
The command to check the date and time is:
Alternatively, the command below shows more detailed time information.
Javascript Time zone
See JavaScript:TimeZone for details.
How to change the time
Changing with the timedatectl command
The timedatectl command used to check the time can also change the time zone easily.
The following command shows the Korean time zone.
Set the Korean time zone to Asia/Seoul.
After running the command, check the time again to see the changed time zone.
Changing /etc/localtime
The current time zone setting can be found by checking the /etc/localtime symbolic link.
If it is set to UTC, it points to /usr/share/zoneinfo/Etc/UTC.
Running timedatectl above changes this symbolic link.
To change to Korea Standard Time (KST), delete /etc/localtime and create it again.
First, delete the current symbolic link.
Then recreate the symbolic link pointing to Korea Standard Time (/usr/share/zoneinfo/Asia/Seoul).
The time zones for each region can be found under /usr/share/zoneinfo/.
Environment variables
Use TZ:
Can be checked with the date command as follows:
See also
- Localization
- NTP
- when - Calculating time across time zones in the terminal
- Python:zoneinfo
- timezonefinder