What a Unix timestamp is
A Unix timestamp — also called epoch time, POSIX time or Unix time — is the number of seconds that have passed since 1970-01-01 00:00:00 UTC, the Unix epoch. It ignores leap seconds, so every day is exactly 86,400 seconds. Because it is a single integer with no time zone attached, it is the usual way to store and compare instants in databases, logs, JWT claims, cron schedulers and APIs.
The number is the same everywhere on Earth at a given moment. What changes by location is only how it is displayed: 1790000000 is 2026-09-21 14:13:20 in UTC and 2026-09-21 19:43:20 in India Standard Time. That is why the converter above shows several zones side by side instead of guessing one.
Seconds, milliseconds, microseconds or nanoseconds?
Different platforms count the same instant with different precision. The quickest way to tell them apart is the number of digits in a present-day value:
| Unit | Digits today | Example (same instant) | Typical source |
|---|---|---|---|
| Seconds | 10 | 1790000000 | Unix date +%s, PHP time(), Python int(time.time()), JWT exp/iat, MySQL UNIX_TIMESTAMP() |
| Milliseconds | 13 | 1790000000000 | JavaScript Date.now(), Java System.currentTimeMillis(), Kafka, Elasticsearch |
| Microseconds | 16 | 1790000000000000 | PostgreSQL internals, Python time.time_ns()//1000, BigQuery UNIX_MICROS |
| Nanoseconds | 19 | 1790000000000000000 | Go time.Now().UnixNano(), InfluxDB, Prometheus remote write |
Auto-detect uses exactly this rule (up to 11 digits → seconds, 12–14 → milliseconds, 15–17 → microseconds, 18+ → nanoseconds). If you feed a millisecond value to a function that expects seconds you get a date around the year 58,000; the reverse gives a date in January 1970 — both are tell-tale signs of a unit mix-up.
Convert epoch time to IST (India Standard Time)
IST is a fixed UTC+05:30 with no daylight saving time, so converting an epoch timestamp to IST is always “UTC plus 19,800 seconds”. Midnight IST is 18:30 UTC on the previous day, which is the most common source of off-by-one-day bugs in Indian reports built from UTC timestamps. Choose Asia/Kolkata in the selector, or read the IST row that the converter always shows. If you schedule AWS jobs in UTC, the AWS cron to IST converter does the same shift for cron expressions.
Epoch reference table
Boundaries for the current period, computed live in the time zone you selected above (your local zone). Weeks start on Monday, following ISO 8601.
| Boundary | Date | Epoch seconds | Epoch milliseconds |
|---|---|---|---|
| Enable JavaScript to compute the live table. | |||
Notable Unix timestamps
| Timestamp | UTC date | Why it matters |
|---|---|---|
0 | 1970-01-01 00:00:00 | The Unix epoch itself |
1000000000 | 2001-09-09 01:46:40 | First 10-digit timestamp (“billennium”) |
1234567890 | 2009-02-13 23:31:30 | The famous sequential timestamp |
1700000000 | 2023-11-14 22:13:20 | Recent round number |
2000000000 | 2033-05-18 03:33:20 | Two billion seconds |
2147483647 | 2038-01-19 03:14:07 | Largest signed 32-bit value (Y2038) |
-2147483648 | 1901-12-13 20:45:52 | Smallest signed 32-bit value |
Durations in seconds
| Period | Seconds | Period | Seconds |
|---|---|---|---|
| 1 minute | 60 | 1 week | 604800 |
| 1 hour | 3600 | 30 days | 2592000 |
| 1 day | 86400 | 1 average month (30.44 days) | 2629746 |
| IST offset (5 h 30 m) | 19800 | 1 average year (365.2425 days) | 31556952 |
How to get the current epoch time in code
Each snippet prints the current Unix timestamp and then converts a timestamp back to a date.
JavaScript
Math.floor(Date.now() / 1000); // seconds (Date.now() is milliseconds)
new Date(1790000000 * 1000).toISOString(); // "2026-09-21T14:13:20.000Z"
new Date(1790000000 * 1000).toLocaleString("en-IN", { timeZone: "Asia/Kolkata" });
Python
import time, datetime
int(time.time()) # seconds
time.time_ns() # nanoseconds
datetime.datetime.fromtimestamp(1790000000, datetime.timezone.utc)
# datetime.datetime(2026, 9, 21, 14, 13, 20, tzinfo=datetime.timezone.utc)
from zoneinfo import ZoneInfo
datetime.datetime(2026, 9, 24, 15, 30, tzinfo=ZoneInfo("Asia/Kolkata")).timestamp()
Java
long seconds = java.time.Instant.now().getEpochSecond();
long millis = System.currentTimeMillis();
java.time.Instant.ofEpochSecond(1790000000L)
.atZone(java.time.ZoneId.of("Asia/Kolkata")); // 2026-09-21T19:43:20+05:30[Asia/Kolkata]
Go
now := time.Now()
now.Unix() // seconds
now.UnixMilli() // milliseconds
now.UnixNano() // nanoseconds
time.Unix(1790000000, 0).UTC().Format(time.RFC3339) // "2026-09-21T14:13:20Z"
PHP
time(); // seconds
date('Y-m-d H:i:s', 1790000000); // in the default timezone
(new DateTime('@1790000000'))->setTimezone(new DateTimeZone('Asia/Kolkata'))->format(DATE_RFC2822);
MySQL
SELECT UNIX_TIMESTAMP(); -- current epoch seconds
SELECT FROM_UNIXTIME(1790000000); -- in the session time_zone
SELECT UNIX_TIMESTAMP('2026-09-24 15:30:00'); -- session time_zone applies
PostgreSQL
SELECT extract(epoch FROM now())::bigint; -- current epoch seconds
SELECT to_timestamp(1790000000); -- timestamptz
SELECT to_timestamp(1790000000) AT TIME ZONE 'Asia/Kolkata';
Bash / Linux / macOS
date +%s # seconds
date +%s%3N # milliseconds (GNU date)
date -u -d @1790000000 # GNU/Linux: epoch to date
date -u -r 1790000000 # macOS/BSD: epoch to date
TZ=Asia/Kolkata date -d @1790000000
date -d '2026-09-24 15:30:00 IST' +%s # date to epoch (GNU)
PowerShell
[DateTimeOffset]::UtcNow.ToUnixTimeSeconds()
[DateTimeOffset]::FromUnixTimeSeconds(1790000000).UtcDateTime
The year 2038 problem
Older C programs, embedded firmware and some database columns store Unix time in a signed 32-bit integer. The largest value it can hold is 2147483647 — 2038-01-19 03:14:07 UTC (08:44:07 IST). One second later the counter wraps to -2147483648, which reads as 13 December 1901. Linux on 64-bit hardware, JavaScript (which uses 64-bit floats for milliseconds), Java long and PostgreSQL timestamptz are safe. Watch out for MySQL TIMESTAMP columns (limited to 2038 in versions before 8.0.28) and any INT column you use to store epoch seconds — use BIGINT or DATETIME instead.
ISO 8601 vs RFC 2822 vs Unix time
For machine-to-machine exchange, ISO 8601 (2026-09-24T15:30:00+05:30) is readable and sorts correctly as text; RFC 2822 (Thu, 24 Sep 2026 15:30:00 +0530) is what email headers and HTTP Date use; Unix time is smallest and fastest to compare. Store instants as UTC (epoch or ISO with Z) and convert to a local zone only for display. To turn an ISO 8601 string into epoch time, paste it (for example 2026-09-24T10:00:00Z or 2026-09-24T15:30:00+05:30) into Date to Unix timestamp; the offset in the string is respected.
Common questions
Is epoch time the same as a Unix timestamp?
Yes. Both mean seconds since 00:00:00 UTC on 1 January 1970, not counting leap seconds. JavaScript and Java store the same value in milliseconds instead of seconds.
How do I know if my timestamp is in seconds or milliseconds?
Count the digits: 10 for seconds, 13 for milliseconds, 16 for microseconds and 19 for nanoseconds. The converter auto-detects this, and the unit selector lets you override it.
Does a Unix timestamp have a time zone?
No. It is always counted from the epoch in UTC, so the same number is the same instant everywhere. Time zones only affect how that instant is displayed, which is why the results show UTC, IST and your local zone together.
How do I convert a Unix timestamp to IST?
Paste the timestamp and read the IST row, or choose Asia/Kolkata as the result zone. IST is UTC+05:30 all year, so you can also add 19,800 seconds and read the result as UTC.
How do I convert a date and time to a Unix timestamp?
Type the date in the Date to Unix timestamp box (for example 2026-09-24 15:30:00), select the zone the date is written in, and copy the seconds or milliseconds. 15:30 IST and 15:30 UTC differ by 19,800 seconds, so the zone matters.
What is the year 2038 problem?
Signed 32-bit Unix time overflows after 2147483647 (19 January 2038, 03:14:07 UTC) and wraps to a date in 1901. 64-bit time values, JavaScript numbers and BIGINT columns are not affected.
Can a Unix timestamp be negative?
Yes — negative values are dates before 1970. -86400 is 31 December 1969 00:00:00 UTC. The converter accepts negative values in every unit.