Skip to content

FIX Timestamp Reader

  • Timestamps in trading and payment messages: FIX UTC timestamps at the precision their digits state, leap seconds included.

A FIX SendingTime (52) or TransactTime (60) is a UTCTimestamp: YYYYMMDD-HH:MM:SS, then nothing or a period and 3, 6, 9 or 12 digits. Paste one and the tool says what it states. parseFixUtcTimestamp reads it into an instant and a precision, isValidFixUtcTimestamp says whether it is one, and everything on the page is what those calls returned. A second section goes the other way with formatFixUtcTimestamp.

1. Paste a FIX timestamp

Three fraction digits.

The text goes to the library exactly as typed. A SendingTime (52) or TransactTime (60) value is a UTCTimestamp.

2. What the calls read

Instant
Fraction digits
no result
Below the nanosecond
no result
Leap second
no result

Paste a FIX UTCTimestamp.

Not read: there is no timestamp.

3. Write an instant at five precisions

A fraction a narrower precision cuts and does not round up.

Copies the instant from section 2, a leap second included, into the box above.

second
no result
millisecond
no result
microsecond
no result
nanosecond
no result
picosecond
no result
nothing to write

The precision is the digit count. FIX names four fraction widths: milliseconds (3 digits), microseconds (6), nanoseconds (9) and picoseconds (12). A stamp with no fraction is read to the second. The tool draws each run of digits in its own bracket and shows a run that was not sent as a dashed box, so a .100 stamp lights one run and leaves three empty. Reading .100 as a nanosecond count is the mistake in A millisecond stamp read as nanoseconds.

Picoseconds are held apart. An instant here holds nine fraction digits, so the last three digits of a 12-digit stamp are returned as picoseconds and kept off the instant. A stamp that sent them as 000 and a stamp that sent none both report picoseconds as 0, so the plate shows digits only at picosecond precision and says “none sent” everywhere else. It never shows 0 for digits that were not sent.

Second 60. FIX allows a second of 60 only for a leap second UTC really inserted. UTC has inserted 27 since 1972, the last at the end of 2016, and none has been scheduled since. So 20161231-23:59:60.500 is the half second into the one UTC added, and 20171231-23:59:60 is refused: that day had no second 60. Many systems check the spelling and store the second before it; that is Second sixty on an ordinary day. When a stamp is refused, the sentence under the verdict comes from asking the library again: with the 60 changed to 59, then the same day at 23:59:60, then with the fraction removed, then one general sentence. The 23:59:60 probe tells a 60 at the wrong minute from a 60 on a day with no leap second. The tool holds no FIX grammar, width table or leap-second table.

Writing an instant. The second section writes one instant at all five precisions. A narrower precision cuts the extra digits and does not round, so 23:59:59.999600 written to the millisecond is 23:59:59.999, not the next second. The picosecond row is padded with 000: the instant holds nothing finer. A local time with no Z or offset is refused with the sentinel, because it names no instant. The button copies the instant read in section 2, so a leap second round-trips.

import { parseFixUtcTimestamp } from "@northguild/gmt/finance/parse";
import { formatFixUtcTimestamp } from "@northguild/gmt/finance/format";
import { isValidFixUtcTimestamp } from "@northguild/gmt/finance/validate";
isValidFixUtcTimestamp("20161231-23:59:60.500"); // true
isValidFixUtcTimestamp("20171231-23:59:60"); // false
parseFixUtcTimestamp("20240615-14:30:00.100")?.precision; // "millisecond"
formatFixUtcTimestamp("2024-12-31T23:59:59.999600Z", "millisecond"); // "20241231-23:59:59.999"
formatFixUtcTimestamp("2016-12-31T23:59:60.5Z", "millisecond"); // "20161231-23:59:60.500"

Worth trying: a millisecond stamp lights one run of three; the 2016 leap second reads as inserted; then the same second on an ordinary day and read the reason. The Leap Second Timeline lists every second UTC inserted, and the ID Timestamp Decoder reads the timestamps inside identifiers. The rules are in Finance: Message Timestamps, and the mistakes around them are in Finance mistakes.

© 2026 NorthGuild · Licences

Code examples: MIT-0. Packages: MIT. Third-party data and components: their own licences, credited where they appear. Everything else: © 2026 NorthGuild, all rights reserved.