ToolsWeb LogoToolsWeb
Developer4 min

Timestamp & Timezone Guide: UNIX Epoch, UTC, ISO 8601 & JavaScript Gotchas

2026-07-24

What is a UNIX Timestamp?

A UNIX Timestamp (Unix Epoch) represents the total number of seconds (or milliseconds) that have elapsed since January 1, 1970 00:00:00 UTC. It is an absolute, geographical-independent physical point in time.

3 Common Timestamp Mistakes in Web Development

#### 1. 10-Digit (Seconds) vs 13-Digit (Milliseconds) Confusion

  • Backend languages (such as Python, PHP, and Go) often return 10-digit second timestamps (e.g., 1723872000).
  • JavaScript (Date.now()) natively expects 13-digit millisecond timestamps (e.g., 1723872000000).
  • Common Bug: Passing a 10-digit timestamp directly to new Date(timestamp) will mistakenly evaluate the year as 1970! Always multiply by 1,000 first.

#### 2. Local Time vs UTC Serialization

When transmitting datetime strings across APIs without timezone offsets (e.g., "2026-08-17 12:00:00"), clients in different time zones will parse different moments in time.

  • Best Practice: Always serialize datetime values using ISO 8601 UTC format ("2026-08-17T04:00:00.000Z") or raw epoch numbers.

Instant Real-Time Conversion

Use FuaHub Timestamp Converter to debug server logs, decode database timestamps, and translate between human-readable dates and Unix seconds/milliseconds without typing terminal commands.

#Timestamp#UNIX Epoch#Timezone#JavaScript#Developer Tools
Go to Tools