Home / Linux / How to Set Server Timezone on Linux

How to Set Server Timezone on Linux

Set the correct server timezone with timedatectl, verify time and NTP sync, and avoid common mistakes.

Views: 19 Unique: 16 Updated: 2026-03-18

What this is

This guide shows how to set the timezone on a Linux server using timedatectl.

What it is for

  • Correct timestamps in logs
  • Correct scheduled tasks (cron)
  • Avoid confusion when debugging

Prerequisites

  • SSH + sudo

Step-by-step

Step 1) Check current timezone

timedatectl

Step 2) List available timezones

timedatectl list-timezones | head

Step 3) Set timezone (example: America/Mexico_City)

sudo timedatectl set-timezone America/Mexico_City

Step 4) Verify

timedatectl

Step 5) Ensure NTP sync is enabled (recommended)

sudo timedatectl set-ntp true

Conclusion

Your server timezone is now correct. This improves log accuracy and scheduling reliability.

Back to category