Unix Timestamp Converter
Timestamp to Date
Date to Timestamp
Date Difference Calculator
Common Epoch Timestamps
| Event | Timestamp | Date (UTC) |
|---|---|---|
| The Unix Epoch | 0 | 1970-01-01 00:00:00 |
| 1 Billion Seconds | 1000000000 | 2001-09-09 01:46:40 |
| 1234567890 Day | 1234567890 | 2009-02-13 23:31:30 |
| Y2K38 Problem (Max 32-bit int) | 2147483647 | 2038-01-19 03:14:07 |
| 9999-12-31 | 253402300799 | 9999-12-31 23:59:59 |
Get Current Timestamp in Code
JavaScript / Node.js
Math.floor(Date.now() / 1000)
Python
import time
int(time.time())
Java
System.currentTimeMillis() / 1000L
C#
DateTimeOffset.UtcNow.ToUnixTimeSeconds()
PHP
time()
Ruby
Time.now.to_i
Go
time.Now().Unix()
Rust
use std::time::{SystemTime, UNIX_EPOCH};
SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs()
C++ (C++11)
#include <chrono>
std::chrono::duration_cast<std::chrono::seconds>(std::chrono::system_clock::now().time_since_epoch()).count()
Swift
Int(Date().timeIntervalSince1970)
Frequently Asked Questions
What is a unix timestamp converter?
A unix timestamp converter is a tool that translates the number of seconds (or milliseconds) since January 1, 1970 (the Unix epoch) into a human-readable date and time, and vice versa.
How does an epoch converter work?
An epoch converter takes a numeric timestamp representing the Unix epoch and applies timezone offsets and date algorithms to output a formatted string, such as YYYY-MM-DD HH:MM:SS.
How to convert timestamp to date?
To convert a timestamp to a date, you can use our tool above. Simply paste the Unix timestamp into the "Timestamp to Date" input field, and it will instantly show the equivalent human-readable date in your local timezone and UTC.
What is the current unix timestamp?
The current unix timestamp constantly updates every second. It represents the exact number of seconds that have elapsed since midnight on January 1, 1970, UTC.
Why do we use epoch time?
Epoch time provides a single, simple number to represent a specific point in time, independent of timezones or daylight saving time, making it highly efficient for computers to store, sort, and calculate time differences.