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

Current Timestamp (Seconds)
1766500712
Current Time
2025-12-23 14:38:32

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.

Auto - detection: The tool will automatically identify whether the input is a second - level timestamp (10 digits) or a millisecond - level timestamp (13 digits).
Time zone: It displays local time and UTC time, which is convenient for use in different time zones.

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.

Recent Timestamps (Based on Global Time Zone)

Common Timestamps (Durations)

1 Minute
60 Seconds
1 Hour
3600 Seconds
1 Day
86400 Seconds
1 Week
604800 Seconds
1 Month (30 days)
2592000 Seconds
1 Year (365 days)
31536000 Seconds

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

JavaScript
Get Current Timestamp
Math.floor(Date.now() / 1000); // seconds
Date.now(); // milliseconds
Timestamp → Date
new Date(1735689600 * 1000).toISOString();
Date → Timestamp
new Date('2025-01-01T00:00:00Z').getTime();
PHP
Get Current Timestamp
time();                // seconds
intval(microtime(true) * 1000); // milliseconds
Timestamp → Date
date('Y-m-d H:i:s', 1735689600);
Date → Timestamp
strtotime('2025-01-01 00:00:00');
Python
Get Current Timestamp
import time

int(time.time())        # seconds
int(time.time() * 1000) # milliseconds
Timestamp → Date
import datetime

datetime.datetime.utcfromtimestamp(1735689600).isoformat()
Date → Timestamp
import datetime

int(datetime.datetime(2025,1,1,0,0,0,tzinfo=datetime.timezone.utc).timestamp())
Go
Get Current Timestamp
import "time"

time.Now().Unix()      // seconds
time.Now().UnixMilli() // milliseconds
Timestamp → Date
import "time"

time.Unix(1735689600, 0).UTC().Format(time.RFC3339)
Date → Timestamp
import "time"

ts := time.Date(2025,1,1,0,0,0,0,time.UTC).Unix()
Rust
Get Current Timestamp
use chrono::Utc;

let now = Utc::now();
let sec = now.timestamp();        // seconds i64
let ms  = now.timestamp_millis(); // milliseconds i128
Timestamp → Date
use chrono::{DateTime, NaiveDateTime, Utc};

let dt: DateTime = NaiveDateTime::from_timestamp_opt(1735689600, 0)
    .unwrap()
    .and_utc();
let iso = dt.to_rfc3339();
Date → Timestamp
use chrono::DateTime;

let ts = DateTime::parse_from_rfc3339("2025-01-01T00:00:00Z")
    .unwrap()
    .timestamp();
SQL
Get Current Timestamp
-- MySQL / MariaDB
SELECT UNIX_TIMESTAMP();

-- PostgreSQL
SELECT EXTRACT(EPOCH FROM NOW())::bigint;

-- SQLite
SELECT strftime('%s', 'now');
Timestamp → Date
-- MySQL / MariaDB
SELECT FROM_UNIXTIME(1735689600);

-- PostgreSQL
SELECT to_timestamp(1735689600) AT TIME ZONE 'UTC';

-- SQLite
SELECT datetime(1735689600, 'unixepoch');
Date → Timestamp
-- 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');