date → timestamp
Date to Unix Timestamp Converter
Pick a date, a time and an IANA timezone — the tool computes the exact Unix instant in seconds, milliseconds, microseconds and nanoseconds. Timezone handling is explicit because a wall-clock reading only becomes a single instant once you say where it happens.
A timezone is required — the same local date and time is a different instant in each zone.
Unix timestamp (seconds)
—
Milliseconds
—
Microseconds
—
Nanoseconds
—
ISO 8601 (UTC)
—
Date to timestamp in code
// JavaScript — ISO string with offset
Math.floor(Date.parse('2026-09-19T12:30:00Z') / 1000); // seconds
// JavaScript — a specific timezone without Temporal
new Intl.DateTimeFormat('en-US', { timeZone: 'America/New_York' });
// Python
from datetime import datetime, timezone
int(datetime(2026, 9, 19, 12, 30, tzinfo=timezone.utc).timestamp());
// PHP
strtotime('2026-09-19 12:30:00 UTC');
// PostgreSQL
EXTRACT(EPOCH FROM TIMESTAMP '2026-09-19 12:30:00+00')::bigint;Common mistakes
- Assuming the server's timezone.
new Date("2026-09-19 12:30")parses in the runtime's local zone, whilenew Date("2026-09-19")parses as UTC midnight. Two nearly identical strings, two different instants. - Forgetting seconds vs milliseconds. JavaScript's
Date.parse()returns milliseconds; divide by 1,000 before storing a seconds-based timestamp. - Hardcoding UTC offsets. Offsets change with DST. Use IANA zone names like
Europe/Berlin, not+02:00, and let the timezone database resolve the offset for the specific instant.
Free-form date input
Prefer typing the date yourself? The universal converter below accepts ISO 8601, RFC 2822 (Sat, 19 Sep 2026 12:30:00 GMT), plain2026-09-19 12:30:00 and bare timestamps. Date-times without an offset are interpreted in the timezone you select.
Accepts Unix timestamps (s / ms / µs / ns), ISO 8601, RFC 2822 and common date strings.
Timestamp
Unix timestamp (seconds)
—
Milliseconds
—
Microseconds
—
Nanoseconds
—
Date & time
UTC
—
Local time
—
Selected timezone
—
Relative time
—
ISO 8601
—
RFC 3339
—
RFC 2822
—
Frequently asked questions
Why does the converter need a timezone?
Z or +05:30) need no extra timezone.How do I get the current timestamp for "now"?
Math.floor(Date.now() / 1000) in JavaScript, time() in PHP, int(time.time()) in Python.What timestamp does midnight become?
1789776000 in UTC but 1789790400 in America/New_York (EDT, UTC−4) — four hours later in absolute time. Always state the zone when you talk about "midnight".What happens with daylight-saving transitions?
ZonedDateTime. Ambiguous fall-back times resolve to the earlier of the two possible instants.Related tools
Unix Timestamp Converter
Convert timestamps and dates with automatic unit detection — seconds, milliseconds, microseconds, nanoseconds.
Timestamp to Date
Turn any Unix timestamp into UTC, local time, ISO 8601, RFC 3339 and relative time.
Current Unix Time
Live Unix timestamp in seconds, milliseconds, microseconds and nanoseconds with copy buttons.
Epoch Converter
The classic epoch time converter: bidirectional conversion between epoch values and human-readable dates.
Timezone Converter
See one instant across multiple IANA timezones side by side, with add, reorder and copy-all.
Batch Timestamp Converter
Paste a list of timestamps and convert them all at once. Copy as a table or download CSV.