ComfyToolkit

Unix Timestamp

Convert epoch ↔ date and extract timestamps from IDs.

Enter a Unix timestamp or a date to convert.

Unix Timestamp Converter

Paste an epoch value and get a readable date, or pick a date and get the epoch value. This page opens in convert mode.

The unit is inferred from magnitude, because nothing in the number itself says whether it is seconds or milliseconds and guessing wrong is the usual bug.

How the unit is detected

The bands are far enough apart to be unambiguous for any present-day value, and you can override the detection when you know better. Nanosecond values are carried through BigInt rather than a float, so the last digits survive instead of rounding away.

1700000000            10 digits  seconds
1700000000000         13 digits  milliseconds
1700000000000000      16 digits  microseconds
1700000000000000000   19 digits  nanoseconds

Before 1970

Negative timestamps are valid and mean earlier than the epoch: -86400 is the last day of 1969. Plenty of converters reject them or render nonsense, which matters for birth dates and historical records.

Timezone is a rendering choice

The timestamp is an absolute instant; the date shown depends on the zone you select. Dates you enter are read as wall-clock time in that zone, so 2023-11-14 22:13:20 UTC is exactly 1700000000000 ms. Choose the zone explicitly when comparing against a log written on another machine.

The 2038 problem

A signed 32-bit integer holding seconds overflows on 19 January 2038 and wraps to 1901. Modern systems use 64-bit values and are unaffected.

It still surfaces in embedded devices, old database columns and file formats that fixed the width. A date near 1901 in otherwise sane data is a strong hint you are looking at an overflow.

Open the full Unix Timestamp