ปัญหาเกี่ยวกับการตั้งค่า Time Zone ใน Linux
Back to articles

ปัญหาเกี่ยวกับการตั้งค่า Time Zone ใน Linux

ปัญหาเกี่ยวกับการตั้งค่า Time Zone ใน Linux

Linux Updated: February 19, 2026

ปัญหาเกี่ยวกับการตั้งค่า Time Zone ใน Linux และวิธีการแก้ไข

ปัญหาที่เป็นไปได้

การตั้งค่า Time Zone ในระบบปฏิบัติการ Linux อาจพบปัญหาต่างๆ ที่ทำให้เวลาไม่ถูกต้อง หรือไม่สอดคล้องกับที่ต้องการ เช่น:

  1. เลือก Time Zone ผิด: เลือก Time Zone ที่ไม่ถูกต้องสำหรับพื้นที่ที่คุณอยู่ หรือไม่ได้เปลี่ยน Time Zone เมื่อย้ายเครื่องไปอยู่ในพื้นที่ใหม่
  1. ข้อมูลเวลาไม่ถูกต้อง: ข้อมูลเวลาในเครื่องไม่ถูกตั้งค่าถูกต้อง อาจเป็นเพราะแบตเตอรี่บนเมนบอร์ดหมดหรือสาเหตุอื่นที่ทำให้เครื่องไม่สามารถเก็บข้อมูลเวลาได้

วิธีการแก้ไข

1. เลือก Time Zone ให้ถูกต้อง

  • ใช้คำสั่ง timedatectl list-timezones เพื่อแสดงรายชื่อ Time Zone ทั้งหมดที่ระบบสนับสนุน

  • ใช้คำสั่ง sudo timedatectl set-timezone <Timezone> เพื่อเลือก Time Zone ที่ถูกต้อง ตัวอย่างเช่น sudo timedatectl set-timezone Asia/Bangkok

2. ตรวจสอบการเปลี่ยนเวลา

  • ตรวจสอบว่าเครื่องคุณมีการเปลี่ยนเวลาอัตโนมัติหรือไม่ คุณสามารถใช้คำสั่ง timedatectl เพื่อตรวจสอบ

  • หากค่า NTP synchronized เป็น yes แสดงว่าระบบมีการเปลี่ยนเวลาอัตโนมัติ ถ้าไม่ใช่ คุณสามารถเปิดใช้งาน NTP โดยใช้ sudo timedatectl set-ntp true

3. ตรวจสอบแบตเตอรี่บนเมนบอร์ด

  • ถ้าคุณใช้เครื่องเซิร์ฟเวอร์หรือเครื่องคอมพิวเตอร์ที่ไม่มีแบตเตอรี่ คุณอาจต้องตั้งค่าเวลาใหม่เมื่อเครื่องเริ่มต้นใช้งานใหม่

4. ตรวจสอบการตั้งค่า NTP

  • ตรวจสอบการตั้งค่า NTP ว่ามีการอ้างอิงเวลาจากแหล่งที่ถูกต้องหรือไม่

  • คุณสามารถแก้ไขไฟล์ /etc/ntp.conf เพื่อกำหนดแหล่ง NTP ที่ถูกต้อง เช่น server pool.ntp.org

สรุป

การตั้งค่า Time Zone ใน Linux อาจพบปัญหาเกี่ยวกับการเลือก Time Zone ไม่ถูกต้องหรือข้อมูลเวลาที่ไม่ถูกต้อง คุณสามารถแก้ไขโดยการเลือก Time Zone ให้ถูกต้อง ตรวจสอบการเปลี่ยนเวลาอัตโนมัติ และตรวจสอบแหล่ง NTP ที่ถูกต้อง

D

DriteStudio | ไดรท์สตูดิโอ

Cloud, VPS, Hosting and Colocation provider in Thailand

Operated by Craft Intertech (Thailand) Co., Ltd.

Manage your cookie settings

We use different types of cookies to optimize your experience on our website. Click on the categories below to learn more and customize your preferences. Note that blocking some types of cookies may impact your experience.

Necessary Cookies

These cookies are essential for the website to function properly. They enable basic functions like page navigation and access to secure areas.

View cookies used
  • Session cookies (session management)
  • Security cookies (CSRF protection)
Always On

Functional Cookies

These cookies enable personalized features like language preferences and theme settings. Without these, some features may not work properly.

View cookies used
  • lang (language preference)
  • theme (dark/light mode)

Analytics Cookies

These cookies help us understand how visitors interact with our website by collecting and reporting information anonymously.

View cookies used
  • _ga (Google Analytics)
  • _gid (Google Analytics)

Marketing Cookies

These cookies are used to track visitors across websites to display relevant advertisements based on your interests.

View cookies used
  • Advertising cookies
  • Remarketing pixels

Privacy Policy