Unix Timestamp Converter

Unix Timestamp Converter

Current Unix Time
—sec
šŸ’” 10-digit number — āœ“ Seconds is correct

Conversion Result

Enter a date or timestamp to see the conversion

What is Unix Timestamp?

A Unix timestamp counts seconds since the "Unix Epoch" — January 1, 1970, 00:00:00 UTC. Why this date? It was around when Unix was being developed at Bell Labs, and engineers needed a simple starting point. This single number makes dates incredibly easy to compare, sort, and calculate across any programming language.

Seconds (10 digits)

The classic format. Used by PHP, Python, Ruby, Unix shell commands, and most databases.

1705331400

ā‰ˆ 136 years of range

Milliseconds (13 digits)

Extra precision for modern apps. Used by JavaScript, Java, and many APIs.

1705331400000

1000Ɨ more precise

šŸŽ‰ Fun Facts About Unix Time

Epoch Parties šŸŽˆ

Developers celebrate cool timestamps! 1 billion was Sep 9, 2001.1234567890 was Feb 13, 2009 at 23:31:30 UTC — parties were thrown worldwide!

Y2K38 Bug šŸ›

On Jan 19, 2038, 32-bit systems will overflow and think it's 1901! 64-bit systems are safe for another 292 billion years.

Negative Timestamps āŖ

Timestamps can be negative! -1 is Dec 31, 1969 at 23:59:59 UTC. You can represent dates back to 1901 on 32-bit systems.

Always UTC šŸŒ

1704067200 is the same moment everywhere on Earth. NYC sees it as Jan 1, 2024 00:00 UTC, while Tokyo sees Jan 1, 2024 09:00 JST.

Common Date Formats

ISO 8601

2024-01-15T14:30:00Z

International standard. The ā€œZā€ means UTC.

RFC 2822

Mon, 15 Jan 2024 14:30:00 +0000

Used in email headers and HTTP.

SQL Timestamp

2024-01-15 14:30:00

Standard database format.

RFC 3339

2024-01-15T14:30:00+00:00

Profile of ISO 8601 for internet protocols.

Get Current Timestamp - Code Examples

Copy-paste ready snippets for your favorite language:

// JavaScript (milliseconds by default)
Date.now()                      // 1704067200000 (ms)
Math.floor(Date.now() / 1000)   // 1704067200 (sec)
new Date().getTime()            // 1704067200000 (ms)

# Python
import time
int(time.time())                # 1704067200 (sec)
time.time_ns() // 1e6           # milliseconds

// PHP
time();                         // 1704067200 (sec)
round(microtime(true) * 1000);  // milliseconds

// Go
time.Now().Unix()               // seconds
time.Now().UnixMilli()          // milliseconds

// Bash / Terminal
date +%s                        # seconds
date +%s%3N                     # milliseconds

// C# / .NET
DateTimeOffset.UtcNow.ToUnixTimeSeconds()
DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()

Frequently Asked Questions

What is a Unix timestamp (epoch time)?ā–¼
A Unix timestamp (also called Epoch time, POSIX time, or Unix Epoch) counts seconds since January 1, 1970, 00:00:00 UTC. This "birthday of Unix" was chosen because it was around when Unix was being developed. Fun fact: timestamp 0 was a Thursday!
Why are some timestamps 10 digits and others 13 digits?ā–¼
10-digit timestamps count seconds (standard Unix time), while 13-digit timestamps count milliseconds. JavaScript's Date.now() returns milliseconds, while PHP's time() returns seconds. Quick tip: if the number starts with "17" and has 10 digits, it's 2023-2024 in seconds.
What is the Year 2038 problem (Y2K38)?ā–¼
Old 32-bit systems store timestamps as signed integers that max out at 2,147,483,647 (January 19, 2038, 03:14:07 UTC). After this, they overflow to negative numbers, potentially showing dates in 1901! Modern 64-bit systems won't have this problem for 292 billion years. šŸŽ‰
What are the milestone Unix timestamps?ā–¼
0 = Jan 1, 1970 (The Epoch). 1 billion = Sep 9, 2001 (celebrated by geeks). 1234567890 = Feb 13, 2009. 2 billion = May 18, 2033. Developers often throw "epoch parties" when timestamps hit cool numbers!
How do I get current Unix timestamp in different languages?ā–¼
JavaScript: Math.floor(Date.now()/1000) for seconds, Date.now() for ms. Python: import time; time.time(). PHP: time(). Ruby: Time.now.to_i. Go: time.Now().Unix(). Bash: date +%s
What's the difference between UTC and local time in timestamps?ā–¼
Unix timestamps are ALWAYS in UTC (no timezone). When you convert to a date, you choose whether to display in UTC or your local timezone. A timestamp of 1704067200 is always the same moment globally - but shows as different clock times in NYC vs Tokyo.