BT San Technology

16 April 2026

Thai dates, Buddhist and Gregorian years and time zones: designing time data in a web app without drift

2 min read · Websites and web apps

Illustration: a tablet showing a schedule with two time-zone clocks, a hand holding a paper calendar, a Thai flag and a desk clock
AI-generated illustration

This guide is available in Thai only.

วันล้วนกับเวลาที่เกิดเหตุการณ์มีความหมายต่างกัน รูปแบบแสดงผลต่างจากค่าที่เก็บและส่งระหว่างระบบ ภาษา ปฏิทิน และเขตเวลาของผู้ใช้

ขั้นตอนนำไปใช้

  1. แยกวันครบกำหนด วันเกิด และเวลาบันทึก
  2. กำหนดรูปแบบรับเข้า จัดเก็บ และแสดงผล
  3. ทดลองช่วงข้ามวัน ผู้ใช้ต่างประเทศ และการนำเข้าไฟล์
  4. ระบุเขตเวลาในรายงานที่เกี่ยวข้อง

ตัวอย่างผลส่งมอบ

ผลส่งมอบ: ตารางชนิดข้อมูลเวลาของระบบนัดหมาย

ประโยชน์

ช่วยลดปัญหาวันครบกำหนดและรายงานไม่ตรงกัน

ข้อจำกัดและข้อควรระวัง

การบวกหรือลบปีอย่างง่ายไม่ครอบคลุมทุกกรณี ต้องใช้เครื่องมือที่รองรับและทดสอบข้อมูลจริง

แหล่งอ้างอิงเริ่มต้น

  • MDN — Intl.DateTimeFormat
  • W3C — Working with Time Zones

References

  1. MDN — Intl.DateTimeFormat (accessed 2026-11-21)
  2. W3C — Working with Time Zones (accessed 2026-11-21)

Add us on LINE

Scan with the LINE app on your phone

QR code to add LINE @Bankoos

LINE ID: @Bankoos

Open LINE on this computer