ES
↑↓ navigate Enter open Esc close
Time & Date Tools

Unix Epoch to Date & Seconds Converter

Convert Unix Epoch timestamps to human readable dates and seconds in real time. Current Unix Epoch: ------

Epoch to Date
---
---
---
---
Date to Epoch
---
---

Unix Timestamp Cheatsheet in 8 Programming Languages

Quick-reference syntax for generating current epoch timestamps and parsing them into formatted dates across major software ecosystems. Click the copy icon on any snippet to paste directly into your project.

JavaScript / Node.js
Current Epoch (seconds)
Math.floor(Date.now() / 1000)
Timestamp to ISO Date
new Date(ts * 1000).toISOString()
Python
Current Epoch (seconds)
import time; int(time.time())
Timestamp to UTC Date
from datetime import datetime, timezone; datetime.fromtimestamp(ts, tz=timezone.utc)
PHP
Current Epoch (seconds)
$epoch = time();
Timestamp to Formatted Date
gmdate('Y-m-d\TH:i:s\Z', $epoch);
Go (Golang)
Current Epoch (seconds)
time.Now().Unix()
Timestamp to RFC3339 Date
time.Unix(ts, 0).UTC().Format(time.RFC3339)
Rust
Current Epoch (seconds)
SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs()
Timestamp to DateTime (Chrono)
DateTime::from_timestamp(ts, 0)
Java (java.time)
Current Epoch (seconds)
Instant.now().getEpochSecond();
Timestamp to Instant
Instant.ofEpochSecond(ts).toString();
C# (.NET)
Current Epoch (seconds)
DateTimeOffset.UtcNow.ToUnixTimeSeconds();
Timestamp to DateTime
DateTimeOffset.FromUnixTimeSeconds(ts).UtcDateTime;
Bash CLI (Linux / macOS)
Current Epoch (seconds)
date +%s
Convert Timestamp
date -d @1772150400 (GNU) # date -r 1772150400 (BSD)

Reference Table: Timestamp Units and Magnitudes

Depending on the runtime, precision level, and architectural requirements, Unix timestamps are represented across different orders of magnitude. The digit count is a reliable heuristic for contemporary dates (from September 2001 through November 2286).

Format Unit Typical Digits Example Standard Ecosystems Precision & Notes
Unix Seconds (Epoch Seconds) 10 dígitos 1772150400 Linux CLI (date +%s), PHP (time()), Python (time.time()), MySQL UNIX_TIMESTAMP(), JWT Claims (exp, iat) Resolution: 1 second. Standard format for web APIs, HTTP caching headers, and database timestamp columns.
Unix Milliseconds 13 dígitos 1772150400000 JavaScript (Date.now(), new Date().getTime()), Java (System.currentTimeMillis()), Node.js, MongoDB ObjectIDs Resolution: 1 millisecond (10⁻³ s). Standard in browser runtimes. Convert to seconds by dividing by 1,000.
Unix Microseconds 16 dígitos 1772150400000000 PostgreSQL timestamp(6), Go (time.Now().UnixMicro()), Apache / Nginx access log timing, distributed tracing (OpenTelemetry) Resolution: 1 microsecond (10⁻⁶ s). Used in high-performance telemetry and database query duration profiles.
Unix Nanoseconds 19 dígitos 1772150400000000000 Go (time.Now().UnixNano()), Rust (Duration::as_nanos()), Linux kernel system timers, high-frequency trading (HFT) Resolution: 1 nanosecond (10⁻⁹ s). Hardware performance counters and low-latency financial exchanges.
Heuristic Disclaimer: The 10-digit / 13-digit distinction is a practical heuristic for contemporary timestamps (between years 2001 and 2286). Timestamps before September 9, 2001 have 9 digits or fewer, and dates prior to January 1, 1970 are negative numbers.

Historical Milestones and Notable Epoch Timestamps

Key chronological timestamps marking critical milestones in computing history, overflow thresholds, and upcoming decimal milestones.

Timestamp UTC Date & Time Historical Significance / Milestone
0 1970-01-01 00:00:00 UTC Unix Epoch: The universal reference origin point for POSIX time standard.
946684800 2000-01-01 00:00:00 UTC Y2K Millennium: Transition into the year 2000.
1000000000 2001-09-09 01:46:40 UTC 1 Giga-second (1 Billion Seconds): The timestamp transitioned from 9 to 10 decimal digits.
1234567890 2009-02-13 23:31:30 UTC Sequential Digit Milestone: The famous "1234567890" timestamp celebrated worldwide by engineers.
1500000000 2017-07-14 02:40:00 UTC 1.5 Giga-seconds: Milestone achieved during the peak adoption of cloud microservices and Kubernetes.
2000000000 2033-05-18 03:33:20 UTC 2 Giga-seconds (2 Billion Seconds): The next major round decimal milestone.
2147483647 2038-01-19 03:14:07 UTC Year 2038 Problem (Y2038): Maximum value of 32-bit signed integers (2³¹ - 1). Unpatched legacy 32-bit systems will wrap around to negative numbers (Dec 13, 1901).

Complete Technical Guide to Unix Timestamps, UTC, and Time Handling

A Unix timestamp (also known as POSIX time or Epoch seconds) represents time as an integer count of seconds elapsed since 00:00:00 UTC on Thursday, January 1, 1970. Because it is completely agnostic of geographical boundaries, time zones, and daylight saving time (DST) shifts, it serves as the foundational chronological standard for databases (MySQL, PostgreSQL, MongoDB, Redis), distributed microservices, REST APIs, and authentication tokens (JWT).

Storing dates as Unix integers in database indexes allows for ultra-fast range queries, sorting, and expiration calculations without incurring the CPU overhead of string date parsing. It also guarantees that two servers located in Tokyo and New York will agree on the exact absolute moment an event occurred regardless of local clock configurations.

Coordinated Universal Time (UTC) vs. Local Timezone

A common misconception among developers is that timestamps store timezone information. In reality, a Unix timestamp represents a single, universal point on the timeline. The difference between UTC and Local Time is strictly an offset applied at the moment of presentation:

  • UTC (Coordinated Universal Time): The zero-offset time standard (GMT) against which all world clocks are synchronized. It never shifts for summer or winter daylight saving transitions.
  • Local Time: The human-readable date and time computed by taking UTC and adding or subtracting the local geographical UTC offset (e.g., UTC+1 for Madrid/Paris in winter, UTC+2 in summer, UTC-5 for New York in winter).

Because the offset changes dynamically throughout the year depending on regional legislation, converting a timestamp to local time requires consulting the host operating system's IANA Time Zone Database (tzdata).

Why POSIX Time Ignores Leap Seconds

To ensure mathematical predictability, the POSIX Unix time standard defines every day as containing exactly 86,400 seconds (24 × 60 × 60). When the International Earth Rotation and Reference Systems Service (IERS) inserts a leap second to compensate for Earth's irregular rotational deceleration, Unix clocks accommodate the extra second by repeating second 86,400 or using Google-style "leap smearing" (gradually slowing the clock over 24 hours). This design guarantees that subtracting two timestamps divided by 86,400 always yields the exact number of standard calendar days elapsed.

Practical Example

Example: Verifying JSON Web Token (JWT) Expiration
Input: JWT "exp" Claim: 1772150400
Output / Result: UTC: Fri, 27 Feb 2026 00:00:00 GMT | ISO 8601: 2026-02-27T00:00:00Z

Security gateways compare the current epoch time with the "exp" claim value to determine whether an API request authorization token is valid or expired.

Example: HTTP Cache Invalidation Headers
Input: Cache-Control max-age: 86400 | Current Epoch: 1772150400
Output / Result: Expires Header: Sat, 28 Feb 2026 00:00:00 GMT (Epoch: 1772236800)

Adding 86,400 seconds (exactly 1 day) calculates future expiration timestamps for browser caching layers and CDN edge servers.

How to Convert Unix Timestamps in 3 Steps

1

Enter Timestamp or Pick a Date

Paste a numeric timestamp (10 digits for seconds, or 13 digits for milliseconds) in the left panel, or select any date and time in the right panel.

2

Review Instant Real-Time Conversion

The converter automatically calculates local formatted time, UTC string, ISO 8601 notation, and relative elapsed time in real time.

3

Copy Output with One Click

Click the copy button beside any format to paste the exact timestamp or date string into your SQL queries, API payloads, or code.

Frequently Asked Questions about Unix Epoch Timestamps

What is a Unix Epoch timestamp and how does it work?

A Unix timestamp represents the exact number of seconds elapsed since 00:00:00 UTC on Thursday, January 1, 1970 (the Unix Epoch), excluding leap seconds. It provides an unambiguous, timezone-independent format for tracking time across distributed systems, databases, and APIs.

What is the difference between 10-digit and 13-digit timestamps?

Standard Unix timestamps in Linux, C, PHP, and Python measure time in seconds (10 digits). JavaScript (Date.now()) and Java use milliseconds (13 digits). To convert milliseconds to seconds, divide by 1,000 using integer division (Math.floor).

What is the Year 2038 Problem (Y2038)?

On January 19, 2038 at 03:14:07 UTC, 32-bit signed integers will overflow past their maximum limit (2,147,483,647), wrapping around to negative numbers (December 13, 1901). Modern 64-bit operating systems and programming runtimes eliminate this limitation for billions of years.

Does a Unix timestamp take daylight saving time (DST) into account?

Unix timestamps track absolute, continuous time anchored strictly to UTC (Coordinated Universal Time). They are completely unaffected by daylight saving time shifts or geographical time zones. Timezone offsets are applied solely when formatting the timestamp into human-readable local representations.

How are dates before January 1, 1970 represented in Unix time?

Dates prior to the Unix Epoch (January 1, 1970 00:00:00 UTC) are represented using negative integers. For example, a timestamp of -315619200 corresponds to 00:00:00 UTC on January 1, 1960.

Explore complementary developer utilities for scheduling, date difference calculations, payload encoding, and campaign tracking.

Share this tool

Help others by sharing this free tool.