Unix timestamps represent time relative to the Unix epoch, but an unlabeled number is still ambiguous. One API may expect seconds while another expects milliseconds. A local date-time adds another question: which time zone gives that wall-clock reading its meaning?
This guide uses the ToolsOnDuty Unix Timestamp Converter with a fixed November 2026 example. We verified seconds and milliseconds, UTC and local representations, a reverse local-date conversion and the Now button. We also checked the automatic magnitude threshold, which does not correctly identify every historical millisecond timestamp.
Establish the input unit and intended instant
Open Unix Timestamp Converter and use the Timestamp to date field. Unix time is referenced to 1 January 1970 at 00:00:00 UTC. Seconds and milliseconds differ by a factor of one thousand; choosing the wrong interpretation can move a date far outside the intended period.
Our example uses 1793944800 seconds, equivalent to 1793944800000 milliseconds. Both refer to 6 November 2026 at 06:00 UTC. Keep the expected unit with a value when copying it from logs or an API specification. Do not infer the unit from a database column name alone.
Unix seconds: 1793944800
Unix milliseconds: 1793944800000
UTC instant: 2026-11-06T06:00:00.000ZRead UTC, Local and ISO as views of the same instant
Enter 1793944800. The tested UTC row displayed Fri, 06 Nov 2026 06:00:00 GMT, while ISO 8601 displayed 2026-11-06T06:00:00.000Z. The Z suffix identifies the UTC representation rather than a local clock reading.
Our test browser was configured to Asia/Kolkata, so Local displayed 11:30:00 with GMT+0530 and India Standard Time. That is the same instant, not an additional five-and-a-half-hour duration added to the event. Readers in another browser time zone should expect a different Local row while UTC remains unchanged.
Inspect the automatic seconds-or-milliseconds heuristic
The current helper treats an absolute numeric value of at least 1,000,000,000,000 as milliseconds and smaller magnitudes as seconds. That works for the tested contemporary pair, but it is a heuristic based on magnitude rather than an explicit unit selector.
We entered 946684800000, which would be 1 January 2000 if interpreted as milliseconds. Because it is below the threshold, the tool treated it as seconds and did not return that intended date. For historical millisecond values, convert to seconds yourself and verify the expected UTC result. Microseconds and nanoseconds also require explicit unit handling rather than relying on this detection.
Generate an epoch from a local date-time
In Date to timestamp, enter 6 November 2026 at 11:30 using the native date-time field. Its stored date-time value has no embedded offset. In our Asia/Kolkata test browser, the result was 1793944800 seconds and 1793944800000 milliseconds, matching the fixed instant.
The converter does not provide a separate source-zone selector for that field. It uses the browser's local time zone. If your intended time is from another city, establish the correct zone in an appropriate workflow rather than entering its wall-clock time and assuming the current browser will infer the location.
Copy the unit expected by the receiving system
The reverse panel has separate Copy controls for Unix seconds and Unix milliseconds. Choose the one specified by the receiving API or storage format. A number that is valid in both mathematical forms can still be wrong for a system that assumes only one of them.
The whole-seconds output uses the helper's floor operation on milliseconds divided by one thousand. Do not assume that a seconds-only representation preserves subsecond information. Document the unit and precision with stored values, and compare a known test event when integrating two systems that use different timestamp conventions.
Use Now and negative epochs as useful checks
Now fills the timestamp field with the browser's current Unix time in whole seconds. We checked its value against the actual clock at the button click. It is useful for exploring current output, but a screenshot after using it is no longer the fixed reproducible example in this guide.
We also verified that -1 returns 1969-12-31T23:59:59.000Z. Negative seconds can represent instants before the epoch. Very large inputs, unsupported units or nonnumeric text should not be accepted merely because they look like a timestamp; nonnumeric input did not produce converted date rows in our test.
Review daylight-saving and date-only requirements separately
Local date-times around a daylight-saving change can be ambiguous or nonexistent in the relevant zone. A plain date-time field does not carry the explicit offset or disambiguation policy needed to resolve every such case. Verify the source event and zone rules before assigning an epoch to a consequential appointment or deadline.
An epoch instant also differs from a calendar-only date used for age or business-day calculations. Avoid converting one concept into another without deciding the appropriate local date and boundary rules. Keep the original value, expected unit, source zone and intended precision so that another person can reproduce the interpretation.
Try the related tools
Apply the steps from this guide directly in your browser.
Frequently asked questions
Why does the Local row differ from UTC?
It formats the same instant in the browser's local time zone. The test browser used Asia/Kolkata, where 06:00 UTC became 11:30 local.
Does automatic detection identify every millisecond timestamp?
No. It uses an absolute-value threshold of 1e12. The tested historical value 946684800000 was interpreted as seconds rather than its intended milliseconds.
Which zone does Date to timestamp use?
The browser's local zone. A datetime-local value has no embedded offset, and the workspace does not infer a city from the entered clock time.
Can I use seconds and milliseconds interchangeably in an API?
No. Follow the API's specified unit and precision. The numbers differ by a factor of one thousand even when they represent the same instant.
