Every engineer has stared at 1732234567 in a log file and wondered what it means. It's not hard to convert, but the surrounding traps — seconds vs milliseconds, UTC vs local, the 2038 problem — cause more production bugs than the conversion itself.
Seconds or milliseconds?
This is the first question to ask. A 10-digit number is seconds. A 13-digit number is milliseconds. If you see 13 digits and treat them as seconds, you'll land somewhere around the year 58,000.
1732234567 # seconds -> Nov 2026 1732234567000 # milliseconds -> same instant
JavaScript Date.now() returns milliseconds. Python time.time() returns seconds. PHP time() returns seconds but microtime(true) returns a float. Java System.currentTimeMillis() returns milliseconds. Four languages, two conventions, and the compiler won't warn you.
Why timezones break things
A Unix timestamp is timezone-neutral — it's seconds since 1970-01-01T00:00:00Z. The conversion to a human-readable date is where timezones enter, and that's where bugs live.
If your server runs UTC and your users are in UTC+8, a timestamp of midnight UTC displays as 8am for them. That's correct behaviour, but if you hardcoded the server timezone into your display logic, users see the wrong day. I've seen a "daily report" email that went out at 8am for a UTC+8 audience and 8pm for a UTC-8 audience, both showing "today's" data from different days.
Store UTC. Display in the user's timezone. Never mix the two in the same column.
Common conversions
# Linux / macOS
date -d @1732234567
date -r 1732234567 # macOS
# Python
from datetime import datetime, timezone
datetime.fromtimestamp(1732234567, tz=timezone.utc)
# SQL (MySQL)
SELECT FROM_UNIXTIME(1732234567);
SELECT UNIX_TIMESTAMP('2026-11-22 10:00:00');
# JavaScript
new Date(1732234567 * 1000).toISOString()
Our Timestamp Converter handles both seconds and milliseconds, and shows the result in UTC plus your local zone side by side. That last part matters more than it sounds — half the "wrong timestamp" reports I see are just a timezone mismatch between what the server logged and what the dashboard rendered.
The 2038 problem is still with us
32-bit signed integers overflow on 2038-01-19. Embedded devices, old payment terminals, and a surprising amount of industrial control software still use them. If you're building anything with a decade-plus lifespan, use 64-bit timestamps and store them as BIGINT, not INT. MySQL's INT will silently wrap and your dates go backwards.