Unix Timestamp Converter Tool
Convert between Unix timestamps (epoch time) and human-readable dates. Auto-detect s/ms, ISO 8601, RFC 2822, and more.
Get Current Timestamp
// Seconds Math.floor(Date.now() / 1000); // Milliseconds Date.now();
Timestamp to Date
const timestamp = 1709312400; const date = new Date(timestamp * 1000); console.log(date.toISOString()); // "2024-03-01T15:00:00.000Z"
Get Current Timestamp
import time # Seconds int(time.time()) # Milliseconds int(time.time() * 1000)
Timestamp to Date
from datetime import datetime timestamp = 1709312400 dt = datetime.fromtimestamp(timestamp) print(dt.isoformat()) # "2024-03-02T00:00:00"
Get Current Timestamp
// Seconds time(); // Milliseconds (int)(microtime(true) * 1000);
Timestamp to Date
$timestamp = 1709312400;
echo date('c', $timestamp);
// "2024-03-02T00:00:00+09:00"
Get Current Timestamp
# Seconds Time.now.to_i # Milliseconds (Time.now.to_f * 1000).to_i
Timestamp to Date
timestamp = 1709312400 time = Time.at(timestamp) puts time.iso8601 # "2024-03-02T00:00:00+09:00"
Get Current Timestamp
import "time" // Seconds time.Now().Unix() // Milliseconds time.Now().UnixMilli()
Timestamp to Date
timestamp := int64(1709312400) t := time.Unix(timestamp, 0) fmt.Println(t.Format(time.RFC3339)) // "2024-03-02T00:00:00+09:00"
Get Current Timestamp
// Seconds System.currentTimeMillis() / 1000; // Milliseconds System.currentTimeMillis(); // Java 8+ Instant.now().getEpochSecond();
Timestamp to Date
long timestamp = 1709312400L; Instant instant = Instant.ofEpochSecond(timestamp); ZonedDateTime zdt = instant.atZone(ZoneId.systemDefault()); System.out.println(zdt); // "2024-03-02T00:00+09:00[Asia/Tokyo]"
Get Current Timestamp
// Seconds DateTimeOffset.UtcNow.ToUnixTimeSeconds(); // Milliseconds DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
Timestamp to Date
long timestamp = 1709312400; var dto = DateTimeOffset.FromUnixTimeSeconds(timestamp); Console.WriteLine(dto.ToLocalTime()); // "2024/03/02 0:00:00 +09:00"
Get Current Timestamp
use std::time::{SystemTime, UNIX_EPOCH};
let timestamp = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_secs();
Timestamp to Date
// Using chrono crate
use chrono::{NaiveDateTime, TimeZone, Local};
let timestamp = 1709312400_i64;
let dt = Local.timestamp_opt(timestamp, 0).unwrap();
println!("{}", dt.to_rfc3339());
// "2024-03-02T00:00:00+09:00"
Get Current Timestamp
# Seconds date +%s # Milliseconds (GNU date) date +%s%3N # macOS python3 -c "import time; print(int(time.time()))"
Timestamp to Date
# GNU/Linux date -d @1709312400 # macOS date -r 1709312400 # ISO 8601 date -d @1709312400 --iso-8601=seconds
Get Current Timestamp
-- MySQL
SELECT UNIX_TIMESTAMP();
-- PostgreSQL
SELECT EXTRACT(EPOCH FROM NOW())::INT;
-- SQLite
SELECT strftime('%s', 'now');
Timestamp to Date
-- MySQL SELECT FROM_UNIXTIME(1709312400); -- PostgreSQL SELECT TO_TIMESTAMP(1709312400); -- SQLite SELECT datetime(1709312400, 'unixepoch', 'localtime');
How to Use
Enter a Timestamp or Date
Enter a Unix timestamp to convert to a date, or enter a date to convert to a timestamp.
View Results
Results are displayed in multiple formats including ISO 8601, RFC 2822, and relative time.
Copy and Use
Use the copy button next to each result to copy the format you need.
About Unix Timestamps
A Unix timestamp (epoch time) represents time as the number of seconds since January 1, 1970 00:00:00 UTC (Unix Epoch). It is widely used in programming and databases for timezone-independent time management.
Features
- Auto Unit DetectionAutomatically detects seconds, milliseconds, microseconds, or nanoseconds from digit count.
- Multiple FormatsView results in ISO 8601, RFC 2822, relative time, and more simultaneously.
- Code SnippetsReady-to-use code samples in 10 programming languages.
- Privacy ProtectedAll processing happens in your browser. No data is sent to servers.
Use Cases
- Decode API response timestamps
- Verify log file dates
- Convert database datetime columns
- Check JWT token expiration
- Verify cron schedule times