Skip to main content

Advanced Timestamp Converter

Convert between Unix timestamp, ISO 8601, RFC 2822 and relative dates ("3 days ago"). Supports IANA timezones with DST.

Advanced ISO 8601: weeks, ordinal dates, durations, intervals

ISO 8601 is not just "the format with the T". Here you will find the cases that usually go wrong: ISO weeks across the new year, ordinal days, durations such as P1Y2M10DT2H30M, and intervals.

Rules verified on 2026-10-30 against ISO/WD 8601-1 (2016 working draft, Library of Congress copy) and RFC 3339 appendix A. The ISO 8601-1:2019 standard is paywalled and was not consulted.

Date and time

Form readcalendar date
Calendar (extended)2021-01-03
Calendar (basic)20210103
Ordinal (extended)2021-003
Ordinal (basic)2021003
Week (extended)2020-W53-7
Week (basic)2020W537
ISO year, week, day2020 / W53 / 7
Day of the year3

The ISO year (2020) differs from the calendar year (2021): this is the year boundary, where almost every implementation gets it wrong.

Duration

Canonical formP1Y2M10DT2H30M
Components1Y 2M 10D 2H 30M

Years and months have no fixed length: to apply them you need a start date (try an interval such as 2026-01-31/P1M).

Interval

Interval typestart and duration
Start2026-01-31
End2026-02-28
Canonical formP1M
Elapsed time (seconds)2419200
Calendar differenceP1M

When adding months, the day is clamped to the last day of the month (31 January + P1M = 28 February): this is the java.time convention, the standard does not define it.

Come utilizzare Convertitore Timestamp Avanzato

Insert a timestamp or date

Paste Unix timestamp (in seconds or milliseconds), ISO 8601, RFC 2822 date or relative expression like "3 days ago". You can also use the "Now" button for current instant.

Choose reference timezone

Select IANA timezone from list (e.g., Europe/Rome, America/New_York): will be used to calculate local time and daylight saving status.

Read all converted formats

The tool shows Unix, ISO 8601, RFC 2822, relative date, UTC time and selected timezone with indication of DST activation.

Copy the format you need

Use "Copy" button next to each line to quickly copy value into notes ready for pasting in code, log or documentation.

Suggerimenti

  • For API debugging and logging, always prefer comparing timestamps in UTC: avoid ambiguities related to DST and timezone differences between servers and clients.
  • If a timestamp seems "1000 times off", check if it's in seconds or milliseconds: this is the most common error when integrating different systems.
  • Use relative expressions ("3 days ago") for quickly verifying deadlines or TTL without having to manually calculate exact date.
  • PT36H and P1DT12H are not the same duration when a daylight-saving change falls in between: a day is not always 24 hours.

Domande frequenti

What's difference between Unix timestamp in seconds and milliseconds?

Unix timestamp in seconds typically has 10 digits (e.g., 1713956400), while in milliseconds it has 13 (e.g., 1713956400000 used by JavaScript Date.now()). The tool automatically recognizes length and interprets number accordingly.

Which date formats can I paste as input?

You can insert Unix timestamp (9-13 digits), ISO 8601 dates (e.g., 2025-04-24T10:00:00Z), RFC 2822 dates, or relative expressions like "3 days ago", "2 hours ago" or "5 min ago". Parser tries these formats in sequence until it finds a valid one.

What does DST status indicate?

Indicates whether, for the selected time zone and the date entered, daylight saving time or standard time is in effect. Useful for understanding any one-hour gaps between systems that handle time zones differently.

Why use UTC besides local time?

UTC is an absolute reference, without timezone nor DST, and it's the standard recommended for system logs, APIs and databases. Local time in selected timezone serves instead for communication with users or teams in specific geographic area.

Where does calculation occur: browser or server?

Entire conversion occurs client-side in browser using Intl and Date native JavaScript APIs; no timestamp nor date inserted is sent to external server.

Is ISO 8601 just the format with the T?

No. It covers calendar dates (2026-10-30), ordinal dates (2026-303) and week dates (2026-W44-5), in extended or basic format, times with fractions and offsets from UTC, durations (P1Y2M10DT2H30M) and intervals (start/end, start/duration, duration/end). This tool reads all of them and converts them into one another.

How is the ISO week calculated, and why can 1 January fall in week 52 or 53?

Week 01 is the one containing the first Thursday of the year, which is the same as the one containing 4 January; weeks start on Monday. If 1 January falls on a Friday, Saturday or Sunday it belongs to the last week (52 or 53) of the previous year, and 29-31 December can belong to week 01 of the next year. A year has 53 weeks if 1 January is a Thursday, or if it is a leap year and 1 January is a Wednesday.

What happens when you add P1M to 31 January?

ISO 8601 does not define it. This tool clamps the day to the last day of the target month (28 or 29 February), like java.time; other libraries may give a different result. That is why it is better to avoid durations in months when you need an identical result everywhere.