Unix Timestamp Conversion Tool
A two-way conversion tool between Unix/Linux timestamps and date-time, which can perform conversion and comparison based on multiple different time zones.
Current Time
Timestamp to Date
Conversion Result(Automatic)
Date to Timestamp
Conversion Result(Automatic)
Multi-Timestamp Date-Time Converter
Multi-Timestamp Date-Time Converter
Multi-Date Timestamp Converter
Multi-Date Timestamp Converter
Usage Instructions
This tool is used to quickly complete the two - way conversion between Unix timestamps and date - times in different scenarios. It supports second and millisecond precision and allows you to select the target time zone for comparison display. It provides single - card and multi - card converters. The conversion is done as you input, and the results are automatically refreshed when you switch the time zone. It also has built - in recent time ranges and common time spans to meet the needs of development debugging and daily conversions.
Tool Features
- Convert as you input, supporting automatic recognition of second/millisecond timestamps.
- Support global time zone selection and display: three views of local, UTC, and selected time zones.
- Multiple converter cards for easy batch comparison.
- Responsive interface and keyboard - friendly, with good accessibility.
- Built - in recent time ranges and common time spans, copy and use.
What is a Timestamp?
A Unix timestamp is the total number of seconds or milliseconds that have elapsed since 1970 - 01 - 01 00:00:00 UTC (Unix Epoch).
A timestamp is a number representing time, usually in seconds or milliseconds.
The starting point of a timestamp is 00:00:00 UTC on January 1, 1970, which is called the Unix Epoch.
Timestamps were originally used in Unix operating systems, so they are often called Unix timestamps.
Timestamps are widely used in programming and network communication, especially in web development.
Common precisions: seconds (e.g., 1735689600) and milliseconds (e.g., 1735689600000). When representing date - times related to time zones, they need to be formatted and displayed in conjunction with the time zone.
Common Timestamps (Durations)
The Year 2038 Problem of Timestamps
The Year 2038 problem refers to the issue where a 32-bit signed integer storing a Unix timestamp (in seconds since 00:00:00 UTC on January 1, 1970) will overflow after 03:14:07 UTC on January 19, 2038.
Since the range of a 32-bit signed integer is from -2,147,483,648 to 2,147,483,647, and the timestamp of 03:14:07 UTC on January 19, 2038, is 2,147,483,647, a 32-bit signed integer will be unable to represent subsequent timestamps after this point.
Mostly affected are older systems or software that use a 32-bit time_t. Modern systems typically use 64-bit (such as a 64-bit integer in milliseconds) and do not have this problem.
It is recommended to use 64-bit timestamps or a time library that supports a large date range.
How to Get/Convert Timestamps via Programming Languages
Math.floor(Date.now() / 1000); // seconds
Date.now(); // milliseconds
new Date(1735689600 * 1000).toISOString();
new Date('2025-01-01T00:00:00Z').getTime();
time(); // seconds
intval(microtime(true) * 1000); // milliseconds
date('Y-m-d H:i:s', 1735689600);
strtotime('2025-01-01 00:00:00');
import time
int(time.time()) # seconds
int(time.time() * 1000) # milliseconds
import datetime
datetime.datetime.utcfromtimestamp(1735689600).isoformat()
import datetime
int(datetime.datetime(2025,1,1,0,0,0,tzinfo=datetime.timezone.utc).timestamp())
import "time"
time.Now().Unix() // seconds
time.Now().UnixMilli() // milliseconds
import "time"
time.Unix(1735689600, 0).UTC().Format(time.RFC3339)
import "time"
ts := time.Date(2025,1,1,0,0,0,0,time.UTC).Unix()
use chrono::Utc;
let now = Utc::now();
let sec = now.timestamp(); // seconds i64
let ms = now.timestamp_millis(); // milliseconds i128
use chrono::{DateTime, NaiveDateTime, Utc};
let dt: DateTime = NaiveDateTime::from_timestamp_opt(1735689600, 0)
.unwrap()
.and_utc();
let iso = dt.to_rfc3339();
use chrono::DateTime;
let ts = DateTime::parse_from_rfc3339("2025-01-01T00:00:00Z")
.unwrap()
.timestamp();
-- MySQL / MariaDB
SELECT UNIX_TIMESTAMP();
-- PostgreSQL
SELECT EXTRACT(EPOCH FROM NOW())::bigint;
-- SQLite
SELECT strftime('%s', 'now');
-- MySQL / MariaDB
SELECT FROM_UNIXTIME(1735689600);
-- PostgreSQL
SELECT to_timestamp(1735689600) AT TIME ZONE 'UTC';
-- SQLite
SELECT datetime(1735689600, 'unixepoch');
-- MySQL / MariaDB
SELECT UNIX_TIMESTAMP('2025-01-01 00:00:00');
-- PostgreSQL
SELECT EXTRACT(EPOCH FROM TIMESTAMP '2025-01-01 00:00:00+00')::bigint;
-- SQLite
SELECT strftime('%s', '2025-01-01 00:00:00');