fix-simple-binary-encoding
fix-simple-binary-encoding copied to clipboard
TZTimeOnly encoding in local time zone
Is there an option to create a composite binary type for TZTimeOnly with TimeZone (Local) specified, without offset to UTC?
Looking at Technical specification Version 1.0 – Feb. 9, 2017, section 2.12.3 the only option suggested is to represent TZTimeOnly is to include offset to UTC.
Elements as suggested:
- TZTimeOnly | Time of day only with time zone Default: nanoseconds since midnight today, local time | uint64 | 8 | None
- timeUnit = second or millisecond or microsecond or nanosecond May be constant | uint8 | 1 | None - Time zone hour offset | int8 | 1 | None - Time zone minute offset | uint8 | 1 | None
Is the use of the last two elements optional in this composite?
The purpose of TZTimeOnly is to have a timestamp with time zone information. You are looking for a timestamp without such information (and declare that as local time in the related documentation I guess). What you are looking for sounds like an equivalent to LocalMktDate. However, I do not see a good reason to omit the offset information other than avoiding the need to calculate it :-)
The convention for large exchanges has become to always use UTC on the messaging level and leave it to the graphical front ends to convert that into a local timestamp for display purposes, i.e. human consumption. That requires the offset information to be part of the timestamp. This approach has greatly reduced the potential for confusion, especially when daylight savings time comes into play.
Thank you for clarification, Hanno! I misunderstood the purpose of offsets. Makes sense.