Telling the units apart
The most common timestamp bug is mixing up units. JavaScript and Java use milliseconds; Unix, Python and most databases use seconds; Go and some logging systems use nanoseconds. The same instant looks like this in each:
| Unit | Digits (today) | Example |
|---|---|---|
| Seconds | 10 | 1767225600 |
| Milliseconds | 13 | 1767225600000 |
| Microseconds | 16 | 1767225600000000 |
| Nanoseconds | 19 | 1767225600000000000 |
Leave the unit on Auto and the converter picks the reading that lands between 1971 and 2100. If more than one could be right, it says so and shows each reading; click one to use it.
What gets spotted
- Wrong unit: a date in 1970 or the far future, with a one-click switch to the unit that makes sense.
- Thousands separators, as you get when copying from a spreadsheet.
- Impossible dates like
2026-13-11, with the day-month swap offered as a fix. Missing leading zeros and a space instead ofTare fixed too. - Ambiguous dates like
03/04/2026, which is 3 April in the UK and March 4 in the US. - Date strings without a zone, with the zone that was assumed.
- Leap-year and range mistakes like 29 February in a non-leap year, hour 24 or minute 60.
- .NET ticks (
DateTime.Ticks), which look like nanoseconds from around 1990. - The 2038 limit: seconds past 19 January 2038 won’t fit in a signed 32-bit integer.
Formats it reads
1767225600 Unix seconds
1767225600000 Unix milliseconds
2026-01-01T00:00:00Z ISO 8601 / RFC 3339
2026-01-01 00:00:00+01:00 SQL-style with offset
Thu, 01 Jan 2026 00:00:00 GMT HTTP date (RFC 7231)Converting in code
// JavaScript
new Date(1767225600 * 1000).toISOString() // seconds → ISO
Math.floor(Date.parse('2026-01-01T00:00:00Z') / 1000)
# Python
from datetime import datetime, timezone
datetime.fromtimestamp(1767225600, tz=timezone.utc)
-- PostgreSQL
SELECT to_timestamp(1767225600);
# GNU date / macOS
date -u -d @1767225600 # Linux
date -u -r 1767225600 # macOSDebugging token expiry? The JWT decoder reads exp and iat for you. Scheduling jobs? See the cron expression explainer.
Questions people ask
What is a Unix timestamp?
Is my timestamp in seconds or milliseconds?
Why is my date in 1970?
What is the year 2038 problem?
How do I get the current timestamp in code?
Date.now() (milliseconds) or Math.floor(Date.now() / 1000) (seconds). In Python, time.time(). In a shell, date +%s. In PostgreSQL, extract(epoch from now()).Do timestamps have time zones?
2026-11-13 09:30, is read differently by different systems, so the converter tells you which zone it assumed.