Query and configure system time, date, and timezone.
low risk
timedatectl is the systemd tool for managing system time. Shows current time, hardware clock, NTP sync status, and timezone. Used to set timezone for servers and verify NTP is active — critical for distributed systems and log correlation.
| Flag | Meaning |
|---|---|
set-timezone | Set timezone (e.g., Asia/Kolkata) |
set-ntp | Enable/disable NTP sync (true/false) |
list-timezones | List all available timezones |
timedatectlShow current time, timezone, and NTP status · explain & risk-check →timedatectl set-timezone Asia/KolkataSet timezone to IST · explain & risk-check →timedatectl set-ntp trueEnable NTP synchronization · explain & risk-check →timedatectl list-timezones | grep IndiaFind India timezone name · explain & risk-check →Always verify `NTP synchronized: yes` on new servers before deploying distributed applications — unsynchronized clocks cause mysterious TLS errors and log correlation failures.
Reference text is hand-written and may be incomplete — check man timedatectl for your version. Test destructive commands on a non-production system first.