🍋
Menu
Developer

Epoch Time

Unix Epoch Timestamp

The number of seconds elapsed since January 1, 1970 UTC, used as a universal time reference.

รายละเอียดทางเทคนิค

Epoch Time represents time as a single integer, making it timezone-independent and ideal for computation. The 32-bit signed integer limit (2,147,483,647) will overflow on January 19, 2038 (the Y2038 problem). 64-bit timestamps extend the range to ±292 billion years. JavaScript's Date.now() returns milliseconds since epoch, while Unix timestamps use seconds. Converting between timezones is a display concern only — the underlying epoch value is always UTC.

ตัวอย่าง

```javascript
// Current epoch timestamp
const epochMs = Date.now();        // milliseconds
const epochSec = Math.floor(Date.now() / 1000); // seconds

// Convert epoch to human-readable
new Date(1709913600000).toISOString();
// → '2024-03-08T16:00:00.000Z'
```

เครื่องมือที่เกี่ยวข้อง

คำศัพท์ที่เกี่ยวข้อง