technine.io

Tools

Timestamp Converter

Copy the current Unix timestamp or convert between seconds, milliseconds and dates in your selected timezone.

Current Unix timestamp

Updates in your browser. Pause the clock if you need a stable value.

Unix seconds

Unix milliseconds

Current offset: UTC+00:00

Timestamp to date

Convert Unix seconds or milliseconds into readable dates.

Date to timestamp

Interpret a date and time in the selected timezone.

Selected timezone: UTC (UTC+00:00)

Conversions stay in this browser. Your timestamps and dates are not uploaded.

A Unix timestamp counts the seconds elapsed since 1 January 1970 at 00:00:00 UTC. The same timestamp represents one instant worldwide; only its displayed date and time change by timezone. This converter accepts Unix seconds or milliseconds and converts a date in the selected timezone back to both units.

How to use the timestamp converter

  1. 1Choose the browser, UTC, Hong Kong or Shanghai timezone for readable dates and date input.
  2. 2Paste a Unix timestamp, then keep automatic unit detection or choose seconds or milliseconds manually.
  3. 3Enter a date and time to generate Unix seconds and milliseconds, then copy the individual result you need.

10-digit and 13-digit timestamps

The number of digits usually identifies the unit used by current application data.

DigitsUnitExampleTypical use
10Seconds1704067200APIs, server logs and database records
13Milliseconds1704067200000JavaScript and systems that need sub-second precision

This page handles seconds and milliseconds. It does not currently parse 16-digit microseconds or 19-digit nanoseconds.

Unix timestamps, UTC and timezones

A Unix timestamp does not contain a timezone. It identifies a single point in time relative to the Unix epoch in UTC.

When converting a timestamp, this page shows the time in your selected timezone and an ISO 8601 UTC value. A date entered in the date field is interpreted in the selected timezone, so check the timezone and UTC offset before copying the result.

Formats shown by this converter

The tool keeps the machine value and the readable date together so you can check API, log and database values.

Unix seconds
A whole-second value such as 1704067200
Unix milliseconds
A millisecond value such as 1704067200000
Selected date and time
A readable value formatted in the browser, UTC, Hong Kong or Shanghai timezone
ISO 8601 UTC
A standard UTC value ending in Z, such as 2024-01-01T00:00:00.000Z

Get the current Unix timestamp in code

These examples return whole seconds or milliseconds from the same UTC-based Unix epoch.

JavaScript

Date.now() returns milliseconds. Divide by 1,000 and round down for whole seconds.

Seconds

Math.floor(Date.now() / 1000)

Milliseconds

Date.now()

Python 3

time.time_ns() returns an integer count from the Unix epoch, avoiding floating-point conversion.

Seconds

import time
time.time_ns() // 1_000_000_000

Milliseconds

import time
time.time_ns() // 1_000_000

PostgreSQL

EXTRACT(EPOCH) returns seconds from the UTC epoch. clock_timestamp() reads the actual current time.

Seconds

SELECT floor(EXTRACT(EPOCH FROM clock_timestamp()))::bigint;

Milliseconds

SELECT floor(EXTRACT(EPOCH FROM clock_timestamp()) * 1000)::bigint;

Shell on macOS

The built-in date command returns seconds. Use Python 3 when you need a millisecond value across macOS versions.

Seconds

date +%s

Milliseconds

python3 -c 'import time; print(time.time_ns() // 1_000_000)'

Unix timestamps are based on UTC, so these numeric values do not change with the computer or database timezone. A timezone matters only when you format the value as a readable date and time.

Timestamp converter FAQ

What is a Unix timestamp?

A Unix timestamp is the number of seconds elapsed since 1 January 1970 at 00:00:00 UTC. Millisecond timestamps use the same starting point but count milliseconds instead.

How can I tell whether a timestamp uses seconds or milliseconds?

Automatic detection recognises only 10-digit seconds and 13-digit milliseconds, including negative values with those digit counts. For any other length, choose seconds or milliseconds before converting.

Does a Unix timestamp include a timezone?

No. A Unix timestamp represents one point in time and does not store a timezone. Timezones only affect how that point is displayed as a date and time.

Why does the same timestamp show a different time on another device?

The devices or tools may use different selected timezones. The underlying timestamp is unchanged, while the readable date and time reflect the chosen timezone.

Which timezone is used for a date I enter?

The date field is interpreted in the timezone selected above the converter. Choose the browser timezone, UTC, Hong Kong or Shanghai, then verify the displayed UTC offset before copying.

What happens if a local time does not exist at a daylight-saving change?

The converter rejects a local date and time that cannot exist in the selected timezone, rather than silently changing it.

What about a local time that occurs twice?

The converter does not offer a separate choice for repeated local times. Verify the result against the source system, or use an explicit UTC time where that distinction matters.

Is my timestamp or date uploaded?

No. The conversion runs in your browser. The timestamp and date entered in this tool are not sent for server-side conversion.

Continue checking the API payload, token, schedule or encoded value associated with your timestamp.