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
| Tag | Field | Dialects | Messages |
|---|---|---|---|
| 42 | OrigTime | FIX 4.4, FIX 4.2 | 2 |
| 52 | SendingTime | FIX 4.4, FIX 4.2 | 93 |
| 60 | TransactTime | FIX 4.4, FIX 4.2 | 44 |
| 62 | ValidUntilTime | FIX 4.4, FIX 4.2 | 7 |
| 122 | OrigSendingTime | FIX 4.4, FIX 4.2 | 93 |
| 126 | ExpireTime | FIX 4.4, FIX 4.2 | 17 |
| 168 | EffectiveTime | FIX 4.4, FIX 4.2 | 10 |
| 341 | TradSesStartTime | FIX 4.4, FIX 4.2 | 1 |
| 342 | TradSesOpenTime | FIX 4.4, FIX 4.2 | 1 |
| 343 | TradSesPreCloseTime | FIX 4.4, FIX 4.2 | 1 |
| 344 | TradSesCloseTime | FIX 4.4, FIX 4.2 | 1 |
| 345 | TradSesEndTime | FIX 4.4, FIX 4.2 | 1 |
| 367 | QuoteSetValidUntilTime | FIX 4.4, FIX 4.2 | 1 |
| 438 | ContraTradeTime | FIX 4.4, FIX 4.2 | 1 |
| 443 | StrikeTime | FIX 4.4, FIX 4.2 | 1 |
| 483 | TransBkdTime | FIX 4.4 | 2 |
| 515 | ExecValuationPoint | FIX 4.4 | 1 |
| 586 | OrigOrdModTime | FIX 4.4 | 5 |
| 629 | HopSendingTime | FIX 4.4 | 93 |
| 769 | TrdRegTimestamp | FIX 4.4 | 8 |
| 779 | LastUpdateTime | FIX 4.4 | 2 |
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