utc now / iso 8601
The current instant, in ISO 8601

2026-08-12T23:25:07Z

with ms 2026-08-12T23:25:07.549Z · basic 20260812T232507Z · week 2026-W33-3
Device clock: checking…

ISO 8601 is the format that sorts as a string, parses everywhere and cannot be misread across locales. Here is the current value, the grammar behind it, and the exact line where ISO 8601 and RFC 3339 disagree.

The grammar, field by field

FieldExampleRule
YYYY2026Four-digit year, zero padded.
MM01Month 01-12.
DD01Day of month 01-31.
TTLiteral separator between date and time.
hh12Hour 00-23. 24:00:00 is legal as end-of-day only.
mm00Minute 00-59.
ss00Second 00-60 — 60 exists for leap seconds.
.sss.123Optional fractional seconds, any precision.
Z or ±hh:mmZUTC designator or explicit offset.

Valid and invalid

Valid

2026-01-01T12:00:00ZDate, time and UTC designator. The safest form.
2026-01-01T12:00:00+05:30Explicit offset, including half-hour zones.
2026-01-01T12:00:00.123ZFractional seconds — any number of digits is legal.
2026-01-01Calendar date alone.
2026-W01-4ISO week date: week 1, Thursday.
2026-001Ordinal date: day 1 of 2026.
20260101T120000ZBasic format, no separators. Valid ISO 8601, NOT RFC 3339.
P1Y2M3DT4H5M6SA duration, not an instant. ISO 8601 only.

Invalid or unsafe

2026-1-1T12:00:00ZMonths and days must be zero-padded to two digits.
2026-01-01 12:00:00A space instead of T is tolerated by some parsers; not portable.
2026-01-01T12:00:00No offset — the instant is ambiguous. RFC 3339 rejects it.
2026-01-01T12:00:00Z+05:00Z and an offset are mutually exclusive.
01/01/2026Not ISO 8601 at all, and ambiguous between US and UK reading.
2026-01-01T24:00:01ZHour 24 is only legal as exactly 24:00:00, meaning midnight ending the day.

ISO 8601 vs RFC 3339 the interview question, settled

FeatureISO 8601RFC 3339
Uppercase T separatorRequired (basic format aside)Required, though lower-case t is tolerated
UTC offsetOptionalMandatory
Z designatorAllowedAllowed, plus -00:00 meaning "offset unknown"
Week dates (2026-W01-1)AllowedNot allowed
Ordinal dates (2026-001)AllowedNot allowed
Basic format (20260101T120000Z)AllowedNot allowed
Durations and intervalsDefined by the standardOut of scope
Years before 1583By mutual agreementNot allowed
Fractional secondsAny number of digitsAny number of digits

Rule of thumb: RFC 3339 is the strict subset you should emit; ISO 8601 is the looser superset you have to be able to read.

Parse and format it in code

Python
from datetime import datetime, timezone

# format
datetime.now(timezone.utc).isoformat()        # '2026-01-01T12:00:00+00:00'
# parse (3.11+ accepts the trailing Z)
datetime.fromisoformat('2026-01-01T12:00:00Z')
JavaScript
// format
new Date().toISOString();                 // '2026-01-01T12:00:00.000Z'
// parse
new Date('2026-01-01T12:00:00Z');
// NB: Date.parse of a date-only string ('2026-01-01') is UTC,
// but '2026-01-01T00:00:00' (no zone) is LOCAL. Always send an offset.
Go
t, err := time.Parse(time.RFC3339, "2026-01-01T12:00:00Z")
s := t.UTC().Format(time.RFC3339)   // Go's RFC3339 == the ISO 8601 profile
Java
import java.time.*;
import java.time.format.DateTimeFormatter;

OffsetDateTime t = OffsetDateTime.parse("2026-01-01T12:00:00Z");
String s = t.format(DateTimeFormatter.ISO_OFFSET_DATE_TIME);
Rust
use chrono::{DateTime, Utc};

let t: DateTime<Utc> = "2026-01-01T12:00:00Z".parse().unwrap();
let s = t.to_rfc3339();
PHP
$t = new DateTimeImmutable('2026-01-01T12:00:00Z');
echo $t->format(DATE_ATOM);   // RFC 3339 / W3C profile
SQL — PostgreSQL
SELECT '2026-01-01T12:00:00Z'::timestamptz;   -- parses ISO 8601 natively
SELECT to_char(now() AT TIME ZONE 'UTC', 'YYYY-MM-DD"T"HH24:MI:SS"Z"');
Bash
date -u -d '2026-01-01T12:00:00Z' +%s      # parse to epoch
date -u -d @1767268800 --iso-8601=seconds  # epoch to ISO 8601

ISO 8601 questions

What is ISO 8601?
The international standard for writing dates and times as text: biggest unit first, zero-padded, with an explicit UTC offset. 2026-01-01T12:00:00Z is unambiguous in every locale, sorts correctly as a plain string, and parses in every mainstream language.
What is the difference between ISO 8601 and RFC 3339?
RFC 3339 is a narrower profile of ISO 8601 built for internet protocols. Almost everything valid in RFC 3339 is valid ISO 8601, but not the reverse: ISO 8601 also allows week dates (2026-W01-1), ordinal dates (2026-001), basic format with no separators (20260101T120000Z) and durations (P1Y2M3D), none of which RFC 3339 accepts. RFC 3339 requires an offset, ISO 8601 lets you omit it. If you are writing JSON, aim for RFC 3339 and you are also writing valid ISO 8601.
Does the T have to be there?
In RFC 3339 the separator may be a lower-case t or a space by mutual agreement, but a literal uppercase T is what every parser accepts without argument. ISO 8601 permits dropping it only in the basic format. Keep the T.
What does the Z mean?
Zero offset from UTC — the "Zulu" designator from military time. 2026-01-01T12:00:00Z and 2026-01-01T12:00:00+00:00 denote the same instant. RFC 3339 also defines -00:00 to mean "UTC, but the local offset is unknown", a distinction most libraries silently discard.
How many decimal places can the seconds have?
ISO 8601 puts no limit on fractional-second digits, which is a common interoperability bug: JavaScript emits exactly three, Python emits six, Go emits as many as it needs and trims trailing zeros, and some parsers reject anything other than three. If you control both ends, standardise on three or six and say so in your API docs.
Is 2026-01-01 alone valid ISO 8601?
Yes, as a calendar date. The trap is what happens when a datetime parser reads it: JavaScript treats a date-only string as UTC midnight but a date-and-time string with no offset as LOCAL midnight, so adding a time to the string can move the value by hours.

Related

Keyboard shortcuts

cCopy the ISO 8601 timestamp
uCopy the Unix timestamp
/Focus the timezone search
tToggle light and dark
?This help
EscClose