Convert a date between ISO 8601, RFC 2822, Unix time and the US and EU formats that make 03/04 ambiguous. The custom pattern box covers the cases where the system on the other end wants a format no standard covers.
ISO 8601, RFC 2822 and Unix timestamps, in seconds or milliseconds.
US (MM/DD/YYYY) and EU (DD/MM/YYYY) on output. On input, 25/12/2023 is not recognized, because JavaScript reads slashed dates month first.
// ISO 8601
2023-12-25T14:30:00Z
// RFC 2822
Mon, 25 Dec 2023 14:30:00 +0000
// Unix Timestamp
1703514600 Type a Day.js pattern into the Custom Format box and wrap literal text in square brackets, as in DD MMM YYYY [at] HH:mm. The common tokens:
const input = "2023-12-25T14:30:00Z";
const d = new Date(input);
if (isNaN(d)) throw new Error("Invalid Date");
console.log(d.toISOString()); // 2023-12-25T14:30:00.000Z (always UTC)
console.log(d.toUTCString()); // Mon, 25 Dec 2023 14:30:00 GMT (RFC 7231 style)
console.log(d.getTime()); // 1703514600000 (milliseconds)
// Custom pattern such as YYYY-MM-DD HH:mm:ss in UTC
const pad = (n) => String(n).padStart(2, "0");
console.log(
`${d.getUTCFullYear()}-${pad(d.getUTCMonth() + 1)}-${pad(d.getUTCDate())} ` +
`${pad(d.getUTCHours())}:${pad(d.getUTCMinutes())}:${pad(d.getUTCSeconds())}`
);
// Locale-aware output in a specific time zone
console.log(new Intl.DateTimeFormat("en-GB", {
dateStyle: "full", timeStyle: "long", timeZone: "Asia/Jakarta",
}).format(d)); With Day.js installed, dayjs(input).format("DD MMM YYYY HH:mm") gives the same tokens the tool uses.
<?php
// Parse a known pattern strictly
$d = DateTime::createFromFormat("d/m/Y H:i", "25/12/2023 14:30", new DateTimeZone("UTC"));
if ($d === false) {
die("Invalid date");
}
echo $d->format(DATE_ATOM), PHP_EOL; // 2023-12-25T14:30:00+00:00 (ISO 8601)
echo $d->format(DATE_RFC2822), PHP_EOL; // Mon, 25 Dec 2023 14:30:00 +0000
echo $d->format("Y-m-d H:i:s"), PHP_EOL; // SQL style
echo $d->getTimestamp(), PHP_EOL; // 1703514600
// Convert to another zone
$d->setTimezone(new DateTimeZone("America/New_York"));
echo $d->format("D, d M Y H:i T"), PHP_EOL; // Mon, 25 Dec 2023 09:30 EST
// Free-form parsing (less strict, but handy)
echo (new DateTime("next monday 09:00", new DateTimeZone("UTC")))->format("c"), PHP_EOL; createFromFormat() fills unspecified fields with the current time. Add ! at the start of the pattern to zero them.
from datetime import datetime, timezone
from email.utils import format_datetime
from zoneinfo import ZoneInfo
# Parse a known pattern
d = datetime.strptime("25/12/2023 14:30", "%d/%m/%Y %H:%M").replace(tzinfo=timezone.utc)
print(d.isoformat()) # 2023-12-25T14:30:00+00:00
print(format_datetime(d)) # Mon, 25 Dec 2023 14:30:00 +0000 (RFC 2822)
print(d.strftime("%Y-%m-%d %H:%M:%S")) # SQL style
print(int(d.timestamp())) # 1703514600
# Parse ISO 8601 (Python 3.11+ accepts the trailing Z)
iso = datetime.fromisoformat("2023-12-25T14:30:00+00:00")
# Convert to another zone
print(iso.astimezone(ZoneInfo("Asia/Tokyo")).strftime("%d %b %Y %H:%M %Z")) zoneinfo ships with Python 3.9+. On Windows, install the tzdata package to get the zone database.
Store and transmit ISO 8601 (2023-12-25T14:30:00Z). It sorts correctly as plain text, carries its offset, and every language parses it without a library. RFC 2822 (Mon, 25 Dec 2023 14:30:00 +0000) survives in email headers and older HTTP code. Treat locale strings like 12/25/2023 as display only, because the same digits mean a different day in another country.
The tool runs Day.js with the utc, customParseFormat and advancedFormat plugins. Input without an offset is read in your browser's zone, and every card shows the same instant. On another machine the local cards change, but the ISO and Unix values do not. The timezone plugin is not loaded, so to render a third zone, use Intl.DateTimeFormat or one of the snippets above.
This tool follows the specifications below. Read them when you need the exact normative wording, for example to settle an edge case between two implementations.
ISO 8601, RFC 2822, Unix timestamps in seconds or milliseconds, and common text formats such as 12/31/2025 or 31 Dec 2025 14:30. Day-first dates such as 31/12/2025 are not recognized, because JavaScript reads slashed dates month first. Click Use current time to start from the present moment.
Yes. Type a pattern into Custom Format using tokens such as YYYY, MM, DD, HH, mm and ss, and wrap literal text in square brackets. For example, DD MMM YYYY [at] HH:mm gives 25 Dec 2023 at 14:30.
Input without an offset is read in your browser's local time zone. The ISO 8601 and RFC 2822 cards show UTC, and the US, EU and SQL cards show local time. To convert between two named zones, use the time zone converter.
A date-only string such as 2023-12-25 is read as midnight UTC. In a zone behind UTC, that instant is still the evening of the day before. Add a time and an offset to remove the ambiguity.
Yes. The tool uses Day.js, so the format tokens match Day.js and Moment.js. They differ from PHP's date() codes and strftime's %Y-style codes.
For epoch seconds specifically, the Unix timestamp converter shows UTC and local side by side. If the date is going into a schedule, the cron generator is next.