Pcornel
Linux · Time & NTP

Time Zones

Cheat sheet · https://pcornel.dk/topic.php?topic=2831

Back to the Topic

Answer

A time zone tells Linux how to show the UTC system clock as local time, using the IANA tz database (e.g. Europe/Copenhagen). /etc/localtime points to the zone file; applications can override it with TZ.

Remember

The system clock is UTC; the time zone only changes display. Set it with timedatectl set-timezone. Keep tzdata updated for rule changes. Services may need a restart to pick up a new zone; containers often default to UTC.

First checks

  • timedatectl — time zone and local/UTC time
  • ls -l /etc/localtime — linked zone file
  • timedatectl list-timezones | grep <city> — valid zone names
  • echo $TZ — per-process override

Verify in this order

UTC system clock → /etc/localtime (or TZ) → tzdata rules → local time displayed

Where it usually breaks

First mismatch in persistent intent → provider/parser/generator → kernel/userspace runtime → dependency/security context → logs/counters → consumer-visible read-back; preserve identity/native diagnostic/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2831

Confirmation

Confirm action

Continue?