FIXTradingCommunity / fix-simple-binary-encoding

A FIX standard for binary message encoding
Other
262 stars 69 forks source link

2.10.4 Examples of date/time fields: Should 4047baa145fb17 be 004047baa145fb17 ? #126

Closed chtrading closed 3 years ago

chtrading commented 4 years ago

Should 4047baa145fb17 be 004047baa145fb17 (64bits) ?

Probably the zero was eliminated because it was zero on the left and the markdown interpreted that it could be removed (?).

The same occurs with the next example: 10d74916220000

The decoder knows the limits of variable because of the fixed length (64bits), so it could not guess any implicit "00".

kleihan commented 4 years ago

The value seems to be in there since Version 1.0 RC2. Before that, RC1 has two leading zeroes but shows a completely different timestamp, i.e. 007420bf8838fb17. The markdown has the value in single quotes and hence should not lose any zeroes. The values do look too short and seem to by missing two bytes. Is there an online conversion utility to validate the numbers?

donmendelson commented 4 years ago

@kleihan There are a number of programmer's calculators available, including a Chrome plugin. The Windows calculator has programmers mode.

When I enter the numbers into the Windows calculator, they are displayed without leading zeros, but I agree the zeros would be helpful for a fixed-size binary number.

kleihan commented 4 years ago

Added leading zeroes for v1.0 Standard and v2.0 RC3