dates guide
Unix Timestamp Guide
A Unix timestamp is a single integer that represents a moment in time—the number of seconds elapsed since midnight UTC on January 1, 1970, an instant known as the Unix epoch. Timestamps appear everywhere in software: API responses, server logs, database fields, file metadata, and event tracking. They are compact, sortable, and timezone-independent, which makes them useful for any system that needs to record or compare moments across time zones. This guide explains what timestamps are, how to read and convert them, common pitfalls with seconds versus milliseconds, and which DateToolsHQ tool to use for conversion. For system-specific timestamp behavior, consult your platform or language documentation.
Last updated: June 29, 2026
What a Unix timestamp is
The Unix epoch is midnight UTC on January 1, 1970: 1970-01-01T00:00:00Z in ISO 8601 notation. A Unix timestamp counts the number of seconds that have elapsed since that moment. June 15, 2026 at midnight UTC is approximately 1750032000.
Timestamps are always in UTC. They do not carry timezone information. When you see a timestamp, it represents the same instant everywhere on Earth—the local clock reading will differ by timezone, but the underlying moment is the same.
Timestamps sort correctly as integers. A later moment always has a larger timestamp. This makes them ideal for sorting events, measuring durations, and storing instants in databases where you need deterministic ordering.
The name Unix timestamp reflects the origin: the convention was established in Unix operating systems in the late 1960s and early 1970s and has since been adopted by almost every programming language and platform.
Examples
Epoch zero
Timestamp 0 → 1970-01-01T00:00:00Z → January 1, 1970 at midnight UTC. The reference point for all Unix timestamps.
A recent timestamp
Timestamp 1750032000 → approximately June 15, 2026 at midnight UTC. The exact date and time depend on the converter you use.
Seconds vs milliseconds — the most common source of confusion
Original Unix timestamps count seconds. A ten-digit integer like 1750032000 is a second-precision timestamp. Many modern systems—JavaScript in particular—count milliseconds instead. A thirteen-digit integer like 1750032000000 is a millisecond-precision timestamp representing the same moment.
The simplest heuristic: if the timestamp is ten digits, it is seconds. If it is thirteen digits, it is milliseconds. Divide a millisecond timestamp by 1000 to get the equivalent second value.
Mixing seconds and milliseconds in one system is a common bug. A timestamp of 1750032000000 fed into a function that expects seconds will produce a date in the year 57000-something—an obvious signal that you have the wrong precision. The reverse produces a date in 1970, near the epoch.
JavaScript's Date.now() returns milliseconds. Python's time.time() returns seconds as a float. Database TIMESTAMP columns often store seconds. Always confirm the precision of a timestamp before converting or comparing.
Examples
Second-precision (10 digits)
1750032000 → a date in 2026. Ten digits. Expected for most Unix systems and server-side languages.
Millisecond-precision (13 digits)
1750032000000 → the same 2026 date, but in milliseconds. Thirteen digits. Returned by JavaScript's Date.now() and many browser APIs.
How to read and convert a Unix timestamp
To convert a timestamp to a human-readable date, paste it into the Unix Timestamp Converter on DateToolsHQ. The tool accepts both second and millisecond timestamps and displays the UTC date and time in ISO 8601 and long-form formats.
To convert a date to a timestamp, enter the date and time in the converter. The tool outputs the Unix second timestamp for that UTC moment. Use this when your system requires a timestamp and you have a calendar date.
In programming, timestamp conversion is a one-liner in most languages. In Python: datetime.utcfromtimestamp(ts). In JavaScript: new Date(ts * 1000) for second timestamps or new Date(ts) for millisecond timestamps. The Unix Timestamp Converter is useful for quick checks without writing code.
For date math on timestamps—how many days between two timestamps, or what date is 30 days after a timestamp—convert both to dates first, then use the Days Between Dates or Add/Subtract Days calculator.
Negative timestamps and dates before 1970
Timestamps before the Unix epoch—January 1, 1970—are negative. December 31, 1969 at midnight UTC has timestamp −86400. Systems that store negative timestamps correctly can represent any date in the Gregorian calendar, though very early dates (before around 1678 or after 9999) may exceed the range of some 64-bit implementations.
Some older or embedded systems use 32-bit signed integers for timestamps. The maximum 32-bit signed value (2,147,483,647) corresponds to January 19, 2038 at 03:14:07 UTC—the Year 2038 problem. Modern systems use 64-bit integers which extend the range by billions of years.
The Unix Timestamp Converter accepts negative values for dates before 1970. For typical business date calculations, negative timestamps are uncommon—most date questions involve dates after 1970.
Timestamps and timezones
A timestamp has no timezone. It represents an instant in UTC. When you display a timestamp to a user, your application must convert that UTC instant to the user's local timezone. The same timestamp appears as different clock readings in New York, London, and Tokyo.
Timestamp 1750032000 is midnight UTC on approximately June 15, 2026. In New York (UTC−4 during daylight saving), it is 8 PM on June 14. In Tokyo (UTC+9), it is 9 AM on June 15. The underlying instant is identical; only the local representation differs.
Use the Timezone Converter to see how a UTC datetime appears in another timezone. When you need to share a specific moment across timezones—a meeting time, a deadline, a server event—timestamps or explicit UTC notation (2026-06-15T00:00:00Z) are the safest representations.
Storing timestamps in UTC and converting to local time at display is the standard pattern in web development. Storing local times without timezone information is a common source of bugs when users or servers are in different timezones.
Frequently asked questions
- What is a Unix timestamp?
- A Unix timestamp is the number of seconds (or milliseconds) elapsed since midnight UTC on January 1, 1970, called the Unix epoch. It represents a specific instant in time, independent of any timezone.
- How do I convert a Unix timestamp to a date?
- Paste the timestamp into the Unix Timestamp Converter on DateToolsHQ. It accepts both second-precision (10-digit) and millisecond-precision (13-digit) timestamps and shows the UTC date and time.
- Why is my timestamp showing a date in 1970 or 57000?
- A date near 1970 usually means you fed a millisecond timestamp to a function expecting seconds—divide by 1000. A date in the far future (year 57000+) means you fed a second timestamp to a millisecond function—multiply by 1000.
- Are Unix timestamps affected by timezones?
- No. A Unix timestamp represents a UTC instant. The same timestamp produces the same moment everywhere on Earth. Timezone conversion only changes how you display that moment as a local clock reading.
- What is the Year 2038 problem?
- 32-bit signed integer timestamps overflow at January 19, 2038 at 03:14:07 UTC. Modern systems use 64-bit integers which extend the usable range by billions of years—but legacy embedded systems may still be affected.
Related calculators
- Unix Timestamp ConverterConvert Unix timestamps to readable dates and readable dates to Unix timestamps.
- Timezone ConverterConvert time between common timezones and compare time differences.
- Date Format ConverterConvert dates between ISO, UTC, local, and readable formats.
- Date Difference CalculatorFind the exact difference between two dates in days, hours, minutes, and seconds.
- Hours Between Dates CalculatorCalculate total hours, days, and minutes between two date-times (UTC).
Related guides
- Date Format GuideLearn the most common date format standards—ISO 8601, US, UK, Unix timestamps, and locale-specific patterns—and how to convert between them with DateToolsHQ.
- Timezone GuideLearn how timezones work, what UTC offsets and daylight saving time mean, and how to convert times between timezones using DateToolsHQ.
- Date Calculation ReferenceA practical reference for calendar days, business days, date ranges, and which DateToolsHQ calculator fits each question.