Timestamp format cheat sheet

Every format this site converts, with its epoch, unit and an example for the same instant. Paste any example into the converter above to check it.

Nowreading device clock…
Unix number in any unit, ISO 8601, RFC 2822, Excel serial, FILETIME, UUID, ULID or Snowflake.
IANA zone; type to search, e.g. Kolkata, Paris.
Precision and rounding
UTCUTC+00:00
2023-11-14 Tue
22:13:20.000000000
UTCUTC+00:00
2023-11-14 Tue
22:13:20.000000000

Read as Windows FILETIME / LDAP

Unix epoch
Unix seconds1700000000Exact; fraction shown when present
Unix seconds (integer, floor)1700000000
Unix milliseconds1700000000000
Unix microseconds1700000000000000
Unix nanoseconds1700000000000000000
Unix seconds (hex)0x6553F100
Standard date formats
ISO 8601 (UTC)2023-11-14T22:13:20.000000000Z
RFC 3339 (UTC)2023-11-14T22:13:20.000000000+00:00
RFC 9557 (offset + zone)2023-11-14T22:13:20.000000000+00:00[UTC]
RFC 2822 (UTC)Tue, 14 Nov 2023 22:13:20 +0000
HTTP-date (IMF-fixdate)Tue, 14 Nov 2023 22:13:20 GMTAlways GMT; whole seconds
SQL TIMESTAMP (UTC)2023-11-14 22:13:20.000000Microsecond precision max (PostgreSQL/MySQL)
SQL TIMESTAMP (UTC wall time)2023-11-14 22:13:20.000000No zone stored: ambiguous without context
PostgreSQL timestamptz literal2023-11-14 22:13:20.000000+00:00
ISO week date (UTC)2023-W46-2
Ordinal date (UTC)2023-318
Readable (UTC)Tuesday, 14 November 2023, 22:13:20 UTCCanonical English; not locale-dependent
Platform and system epochs
JavaScript new Date(ms)new Date(1700000000000)
Java InstantInstant.ofEpochSecond(1700000000L, 0L)Nanosecond precision
Python datetime (UTC)datetime(2023, 11, 14, 22, 13, 20, 0, tzinfo=timezone.utc)Microsecond precision
.NET DateTime ticks638355968000000000100-ns ticks since 0001-01-01 (DateTime.Ticks with Kind=Utc).
Windows FILETIME / LDAP133444736000000000100-ns intervals since 1601 UTC. Active Directory lastLogon, pwdLastSet, accountExpires.
Chrome / WebKit time13344473600000000Microseconds since 1601 UTC (Chrome history, cookies).
Apple Cocoa / Core Data721692800NSDate timeIntervalSinceReferenceDate, Core Data, iOS/macOS plists.
Mac HFS+ seconds3782844800Classic Mac OS / HFS+ volume dates (seconds since 1904).
NTP seconds (era 0)3908988800NTP era 0 wraps on 2036-02-07; era numbers are not encoded in the 32-bit field.
Excel serial 1900 (UTC wall time) rounded45244.9259259259Days since 1900-01-00 with the Lotus 1-2-3 leap-year bug (serial 60 = fictitious 1900-02-29). No time zone.
Excel serial 1904 (UTC wall time) rounded43782.9259259259Older Mac Excel workbooks. Days since 1904-01-01. No time zone.
Julian Date rounded2460263.4259259259Days since noon UT, 24 Nov 4714 BC. Computed from UTC, so it ignores the UT1/TT distinction.
Modified Julian Date rounded60262.9259259259JD - 2400000.5. Computed from UTC.
GPS seconds1384035218Seconds since the GPS epoch, counting leap seconds (GPS = TAI - 19 s). Uses the bundled leap-second table.
TAI (TAI-UTC = 37 s)2023-11-14T22:13:57.000000000 TAIFrom the bundled leap-second table
ID range bounds
Smallest UUIDv7 at this ms018bcfe5-6800-7000-8000-000000000000Use as a range-query lower bound
Smallest ULID at this ms01HF7YAT000000000000000000
Smallest Twitter / X Snowflake1724551110456246272
Smallest Discord Snowflake1174109840998400000
Smallest MongoDB ObjectId6553f1000000000000000000
Settings and local data

Storage: checking…

Reading the table

Every example below is the same instant, 2023-11-14T22:13:20Z (Unix 1700000000), written in a different format. The epoch column is the moment each format counts from, and the unit column is what one step of the number means. Formats marked "no zone" store wall-clock time and need a time zone before they can become an instant. The values were generated by this site's conversion engine, and the unit tests check them against published reference values.

Timestamp formats for 2023-11-14T22:13:20Z
FormatEpochUnit2023-11-14T22:13:20Z
Unix seconds1970-01-01 UTC1 s1700000000
Unix milliseconds1970-01-01 UTC1 ms1700000000000
Unix microseconds1970-01-01 UTC1 µs1700000000000000
Unix nanoseconds1970-01-01 UTC1 ns1700000000000000000
ISO 8601 / RFC 3339 (UTC)textany precision2023-11-14T22:13:20Z
RFC 3339 with offsettextany precision2023-11-15T03:43:20.000+05:30
RFC 2822 (email)text1 sTue, 14 Nov 2023 22:13:20 +0000
HTTP-date (IMF-fixdate)text, always GMT1 sTue, 14 Nov 2023 22:13:20 GMT
SQL TIMESTAMPtext, no zone1 µs2023-11-14 22:13:20.000000
Windows FILETIME / LDAP1601-01-01T00:00:00Z100 ns133444736000000000
.NET DateTime ticks0001-01-01T00:00:00100 ns638355968000000000
Chrome / WebKit time1601-01-01T00:00:00Z1 µs13344473600000000
Apple Cocoa / Core Data2001-01-01T00:00:00Z1 s721692800
Mac HFS+ seconds1904-01-01T00:00:001 s3782844800
NTP seconds (era 0)1900-01-01T00:00:00Z1 s3908988800
Excel serial (1900 system)1899-12-30 (1900 system)1 day (no zone)45244.9259259259
Excel serial (1904 system)1904-01-011 day (no zone)43782.9259259259
Julian Date-4713-11-24T12:00:00Z (proleptic Gregorian)1 day2460263.4259259259
Modified Julian Date1858-11-17T00:00:00Z1 day60262.9259259259
GPS seconds1980-01-06T00:00:00Z1 s, counts leap seconds1384035218
UUIDv7 (first 48 bits)1970-01-01 UTC1 ms018bcfe5-6800-7000-8000-000000000000
ULID (first 10 chars)1970-01-01 UTC1 ms01HF7YAT000000000000000000
Discord Snowflake (id >> 22)2015-01-01 UTC1 ms1174109840998400000
Twitter / X Snowflake (id >> 22)2010-11-04T01:42:54.657Z1 ms1724551110456246272
MongoDB ObjectId (first 4 bytes)1970-01-01 UTC1 s6553f1000000000000000000

Leap seconds and GPS

Unix time, Windows FILETIME and .NET ticks all ignore leap seconds. GPS time does not: it runs ahead of UTC by the number of leap seconds since 1980, currently 18. TAI is a further 19 seconds ahead of GPS. Converting to or from GPS or TAI uses a bundled leap-second table. Results for dates after the table's expiry are labelled uncertain, because a future leap second (or the planned abolition of leap seconds) would change them.

Questions

Which format should I store timestamps in?
For interchange, RFC 3339 in UTC with the precision you need. For storage, a 64-bit integer with a documented unit (milliseconds or microseconds), or your database's native timestamptz type.
What is the LDAP / Active Directory timestamp?
Attributes such as lastLogonTimestamp and pwdLastSet use Windows FILETIME: 100-nanosecond intervals since 1601-01-01 UTC. The value 0 and the maximum 9223372036854775807 mean "never".
Do UUIDv4 values contain a timestamp?
No. Version 4 is random. Only versions 1, 6 and 7 embed a time, and the converter explains when a UUID has none.