UTCTimestamp

base: StringFIX 4.4FIX 4.2

UTCTimestamp is a FIX datatype defined in FIX 4.4 and FIX 4.2, carried on the wire as String. 21 fields use it.

Wire format

Base type
String
Format
YYYYMMDD-HH:MM:SS[.sss]
Fields
21

A UTC date and time. The fractional-seconds part is optional, so two timestamps can be equal but not byte-identical.

What the specification says

FIX 4.4

string field representing Time/date combination represented in UTC (Universal Time Coordinated, also known as "GMT") in either YYYY-MM-DDTHH:MM:SS (whole seconds) or YYYY-MM-DDTHH:MM:SS.sss (milliseconds) format, colons, dash, and period required. Valid values: * YYYY = 0000-9999, MM = 01-12, DD = 01-31, HH = 00-23, MM = 00-59, SS = 00-60 (60 only if UTC leap second) (without milliseconds). * YYYY = 0000-9999, MM = 01-12, DD = 01-31, HH = 00-23, MM = 00-59, SS = 00-60 (60 only if UTC leap second), sss=000-999 (indicating milliseconds). Leap Seconds: Note that UTC includes corrections for leap seconds, which are inserted to account for slowing of the rotation of the earth. Leap second insertion is declared by the International Earth Rotation Service (IERS) and has, since 1972, only occurred on the night of Dec. 31 or Jun 30. The IERS considers March 31 and September 30 as secondary dates for leap second insertion, but has never utilized these dates. During a leap second insertion, a UTCTimestamp field may read "1998-12-31T23:59:59", "1998-12-31T23:59:60", "1999-01-01T00:00:00". (see http://tycho.usno.navy.mil/leapsec.html)

FIX 4.2

Time/date combination represented in UTC (Universal Time Coordinated, also known as "GMT") in either YYYYMMDD-HH:MM:SS (whole seconds) or YYYYMMDD-HH:MM:SS.sss (milliseconds) format, colons, dash, and period required. Valid values: * YYYY = 0000-9999, MM = 01-12, DD = 01-31, HH = 00-23, MM = 00-59, SS = 00-59 (without milliseconds). * YYYY = 0000-9999, MM = 01-12, DD = 01-31, HH = 00-23, MM = 00-59, SS = 00-59. sss=000-999 (indicating milliseconds).

Descriptions are quoted from the FIX Orchestra sources under the Apache 2.0 licence.

How @boarteam/fix handles it

@boarteam/fix keeps the value as a string; format rules are checked by validate(), which reports validate/invalid-value rather than throwing.

Fields with this datatype

TagFieldDialectsMessages
42OrigTimeFIX 4.4, FIX 4.22
52SendingTimeFIX 4.4, FIX 4.293
60TransactTimeFIX 4.4, FIX 4.244
62ValidUntilTimeFIX 4.4, FIX 4.27
122OrigSendingTimeFIX 4.4, FIX 4.293
126ExpireTimeFIX 4.4, FIX 4.217
168EffectiveTimeFIX 4.4, FIX 4.210
341TradSesStartTimeFIX 4.4, FIX 4.21
342TradSesOpenTimeFIX 4.4, FIX 4.21
343TradSesPreCloseTimeFIX 4.4, FIX 4.21
344TradSesCloseTimeFIX 4.4, FIX 4.21
345TradSesEndTimeFIX 4.4, FIX 4.21
367QuoteSetValidUntilTimeFIX 4.4, FIX 4.21
438ContraTradeTimeFIX 4.4, FIX 4.21
443StrikeTimeFIX 4.4, FIX 4.21
483TransBkdTimeFIX 4.42
515ExecValuationPointFIX 4.41
586OrigOrdModTimeFIX 4.45
629HopSendingTimeFIX 4.493
769TrdRegTimestampFIX 4.48
779LastUpdateTimeFIX 4.42

Decode this in your own code

The same engine that produced the decoded example above is an Apache-2.0 npm package with zero runtime dependencies. It runs in Node and in the browser, and parse() returns problems as data instead of throwing.

npm i @boarteam/fix @boarteam/fix-dict-fix44