Unix timestamps are the universal time format in computing — databases, APIs, and log files all use them. Learn what they are, the seconds vs milliseconds trap, and how to convert them instantly.
You are debugging an API response and the timestamp field contains 1748390400. Is that in the past? The future? What date does it represent? Unix timestamps are everywhere in databases, APIs, and log files — understanding them and converting them to human-readable dates is a daily developer task.
A Unix timestamp (also called POSIX time or epoch time) is the number of seconds that have elapsed since the Unix epoch: midnight (00:00:00 UTC) on 1 January 1970. This became the standard reference point when Unix operating system time was formalised.
The Unix timestamp is timezone-independent — it always counts seconds from the same fixed point in UTC, regardless of what timezone a system is in. This makes it the preferred format for storing and transmitting time in databases and APIs, because conversions to local times are handled at display time.
Some reference values:
0 = 1970-01-01 00:00:00 UTC1000000000 = 2001-09-09 01:46:40 UTC1748390400 = 2025-05-27 16:00:00 UTC (approx)2147483647 = 2038-01-19This is a common source of confusion. Most Unix timestamps represent seconds, but JavaScript's Date.now() and many JavaScript APIs return milliseconds (seconds × 1000). A timestamp in milliseconds is approximately 13 digits long as of 2026; a timestamp in seconds is 10 digits.
| Format | Approx. digits (2026) | Example | Used by |
|---|---|---|---|
| Seconds | 10 digits | 1748390400 | Unix/Linux, Python, most databases |
| Milliseconds | 13 digits | 1748390400000 | JavaScript, Java, many web APIs |
| Microseconds | 16 digits | 1748390400000000 | High-precision logging, PostgreSQL |
If your timestamp converter gives you a date in 1970, you may have provided milliseconds where seconds were expected (or vice versa). Divide by 1000 or multiply by 1000 as appropriate.
import time; time.time() → seconds since epochDate.now() → milliseconds since epochnew Date(timestamp * 1000) (if timestamp is in seconds)from datetime import datetime; datetime.utcfromtimestamp(ts)7 * 24 * 60 * 60 (604800 seconds) to the timestamp.Systems that store Unix timestamps as 32-bit signed integers will overflow on19 January 2038 at 03:14:07 UTC — the maximum value of a 32-bit signed integer is 2,147,483,647. After this point, the timestamp wraps around to negative numbers, potentially causing date calculations to break or report dates in 1901.
Most modern systems have migrated to 64-bit integers, which extend the usable range to approximately 292 billion years. Check any legacy systems that might still use 32-bit timestamp storage.
Unix timestamps are the universal language of time in computing — compact, timezone- agnostic, and supported by every programming language. The ToolsGravity Timestamp Converter converts between Unix timestamps and human-readable dates in both directions, handling seconds, milliseconds, and microseconds. Keep it bookmarked for daily API debugging and log analysis.