Skip to content

Commit c9df52f

Browse files
Update timestamp methods
1 parent c4b6e40 commit c9df52f

88 files changed

Lines changed: 4326 additions & 1217 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Asx/Asx_AsxSecurities_Ntp_Itch_v1_05_Dissector.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2817,7 +2817,7 @@ asx_asxsecurities_ntp_itch_v1_05.timestamp.composite = function(buffer, offset,
28172817
local range = buffer(offset, length)
28182818
local nanoseconds = range:uint()
28192819
local value = asx_asxsecurities_ntp_itch_v1_05.timestamp.translate(nanoseconds, stored_second)
2820-
local display = asx_asxsecurities_ntp_itch_v1_05.timestamp.display(nanoseconds, stored_second)
2820+
local display = asx_asxsecurities_ntp_itch_v1_05.timestamp.display(nanoseconds, stored_second, packet)
28212821
parent = parent:add(omi_asx_asxsecurities_ntp_itch_v1_05.fields.timestamp, range, value, display)
28222822

28232823
asx_asxsecurities_ntp_itch_v1_05.second.generated(stored_second, range, packet, parent)

Asx/Asx_AsxSecurities_T24_Itch_v1_13_Dissector.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2860,7 +2860,7 @@ asx_asxsecurities_t24_itch_v1_13.timestamp.composite = function(buffer, offset,
28602860
local range = buffer(offset, length)
28612861
local nanoseconds = range:uint()
28622862
local value = asx_asxsecurities_t24_itch_v1_13.timestamp.translate(nanoseconds, stored_second)
2863-
local display = asx_asxsecurities_t24_itch_v1_13.timestamp.display(nanoseconds, stored_second)
2863+
local display = asx_asxsecurities_t24_itch_v1_13.timestamp.display(nanoseconds, stored_second, packet)
28642864
parent = parent:add(omi_asx_asxsecurities_t24_itch_v1_13.fields.timestamp, range, value, display)
28652865

28662866
asx_asxsecurities_t24_itch_v1_13.second.generated(stored_second, range, packet, parent)

Asx/Asx_AsxSecurities_Trade_Itch_v2_0_Dissector.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1765,7 +1765,7 @@ asx_asxsecurities_trade_itch_v2_0.timestamp.composite = function(buffer, offset,
17651765
local range = buffer(offset, length)
17661766
local nanoseconds = range:uint()
17671767
local value = asx_asxsecurities_trade_itch_v2_0.timestamp.translate(nanoseconds, stored_second)
1768-
local display = asx_asxsecurities_trade_itch_v2_0.timestamp.display(nanoseconds, stored_second)
1768+
local display = asx_asxsecurities_trade_itch_v2_0.timestamp.display(nanoseconds, stored_second, packet)
17691769
parent = parent:add(omi_asx_asxsecurities_trade_itch_v2_0.fields.timestamp, range, value, display)
17701770

17711771
asx_asxsecurities_trade_itch_v2_0.second.generated(stored_second, range, packet, parent)

Asx/Asx_AsxSecurities_Trade_Itch_v3_1_Dissector.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1548,7 +1548,7 @@ asx_asxsecurities_trade_itch_v3_1.timestamp.composite = function(buffer, offset,
15481548
local range = buffer(offset, length)
15491549
local nanoseconds = range:uint()
15501550
local value = asx_asxsecurities_trade_itch_v3_1.timestamp.translate(nanoseconds, stored_second)
1551-
local display = asx_asxsecurities_trade_itch_v3_1.timestamp.display(nanoseconds, stored_second)
1551+
local display = asx_asxsecurities_trade_itch_v3_1.timestamp.display(nanoseconds, stored_second, packet)
15521552
parent = parent:add(omi_asx_asxsecurities_trade_itch_v3_1.fields.timestamp, range, value, display)
15531553

15541554
asx_asxsecurities_trade_itch_v3_1.second.generated(stored_second, range, packet, parent)

Asx/Asx_AsxSecurities_Trade_Ouch_v2_0_Dissector.lua

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,7 +1001,12 @@ end
10011001
asx_asxsecurities_trade_ouch_v2_0.requested_sequence_number.dissect = function(buffer, offset, packet, parent)
10021002
local length = asx_asxsecurities_trade_ouch_v2_0.requested_sequence_number.size
10031003
local range = buffer(offset, length)
1004-
local value = range:string()
1004+
local value = tonumber(range:string())
1005+
1006+
if value == nil then
1007+
value = "Not Applicable"
1008+
end
1009+
10051010
local display = asx_asxsecurities_trade_ouch_v2_0.requested_sequence_number.display(value, buffer, offset, packet, parent)
10061011

10071012
parent:add(omi_asx_asxsecurities_trade_ouch_v2_0.fields.requested_sequence_number, range, value, display)
@@ -2526,6 +2531,14 @@ asx_asxsecurities_trade_ouch_v2_0.payload.dissect = function(buffer, offset, pac
25262531
if packet_type == "S" then
25272532
return asx_asxsecurities_trade_ouch_v2_0.sequenced_data_packet.dissect(buffer, offset, packet, parent)
25282533
end
2534+
-- Dissect Server Heartbeat Packet
2535+
if packet_type == "H" then
2536+
return offset
2537+
end
2538+
-- Dissect End Of Session Packet
2539+
if packet_type == "Z" then
2540+
return offset
2541+
end
25292542
-- Dissect Login Request Packet
25302543
if packet_type == "L" then
25312544
return asx_asxsecurities_trade_ouch_v2_0.login_request_packet.dissect(buffer, offset, packet, parent)
@@ -2534,6 +2547,14 @@ asx_asxsecurities_trade_ouch_v2_0.payload.dissect = function(buffer, offset, pac
25342547
if packet_type == "U" then
25352548
return asx_asxsecurities_trade_ouch_v2_0.unsequenced_data_packet.dissect(buffer, offset, packet, parent)
25362549
end
2550+
-- Dissect Client Heartbeat Packet
2551+
if packet_type == "R" then
2552+
return offset
2553+
end
2554+
-- Dissect Logout Request Packet
2555+
if packet_type == "O" then
2556+
return offset
2557+
end
25372558

25382559
return offset
25392560
end
@@ -2600,7 +2621,7 @@ asx_asxsecurities_trade_ouch_v2_0.soup_bin_tcp_packet.fields = function(buffer,
26002621
-- Dependency element: Packet Type
26012622
local packet_type = buffer(index - 1, 1):string()
26022623

2603-
-- Payload: Runtime Type with 6 branches
2624+
-- Payload: Runtime Type with 10 branches
26042625
index = asx_asxsecurities_trade_ouch_v2_0.payload.dissect(buffer, index, packet, parent, packet_type)
26052626

26062627
return index

Asx/Asx_AsxSecurities_Trade_Ouch_v3_6_Dissector.lua

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,12 @@ end
10441044
asx_asxsecurities_trade_ouch_v3_6.requested_sequence_number.dissect = function(buffer, offset, packet, parent)
10451045
local length = asx_asxsecurities_trade_ouch_v3_6.requested_sequence_number.size
10461046
local range = buffer(offset, length)
1047-
local value = range:string()
1047+
local value = tonumber(range:string())
1048+
1049+
if value == nil then
1050+
value = "Not Applicable"
1051+
end
1052+
10481053
local display = asx_asxsecurities_trade_ouch_v3_6.requested_sequence_number.display(value, buffer, offset, packet, parent)
10491054

10501055
parent:add(omi_asx_asxsecurities_trade_ouch_v3_6.fields.requested_sequence_number, range, value, display)
@@ -2549,6 +2554,14 @@ asx_asxsecurities_trade_ouch_v3_6.payload.dissect = function(buffer, offset, pac
25492554
if packet_type == "S" then
25502555
return asx_asxsecurities_trade_ouch_v3_6.sequenced_data_packet.dissect(buffer, offset, packet, parent)
25512556
end
2557+
-- Dissect Server Heartbeat Packet
2558+
if packet_type == "H" then
2559+
return offset
2560+
end
2561+
-- Dissect End Of Session Packet
2562+
if packet_type == "Z" then
2563+
return offset
2564+
end
25522565
-- Dissect Login Request Packet
25532566
if packet_type == "L" then
25542567
return asx_asxsecurities_trade_ouch_v3_6.login_request_packet.dissect(buffer, offset, packet, parent)
@@ -2557,6 +2570,14 @@ asx_asxsecurities_trade_ouch_v3_6.payload.dissect = function(buffer, offset, pac
25572570
if packet_type == "U" then
25582571
return asx_asxsecurities_trade_ouch_v3_6.unsequenced_data_packet.dissect(buffer, offset, packet, parent)
25592572
end
2573+
-- Dissect Client Heartbeat Packet
2574+
if packet_type == "R" then
2575+
return offset
2576+
end
2577+
-- Dissect Logout Request Packet
2578+
if packet_type == "O" then
2579+
return offset
2580+
end
25602581

25612582
return offset
25622583
end
@@ -2623,7 +2644,7 @@ asx_asxsecurities_trade_ouch_v3_6.soup_bin_tcp_packet.fields = function(buffer,
26232644
-- Dependency element: Packet Type
26242645
local packet_type = buffer(index - 1, 1):string()
26252646

2626-
-- Payload: Runtime Type with 6 branches
2647+
-- Payload: Runtime Type with 10 branches
26272648
index = asx_asxsecurities_trade_ouch_v3_6.payload.dissect(buffer, index, packet, parent, packet_type)
26282649

26292650
return index

Asx/ReadMe.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
| [AsxSecurities][AsxSecurities.Exchange] | [T24][Asx.AsxSecurities.T24] | [Itch][Omi.Encoding.Itch] | [1.13][Asx.AsxSecurities.T24.Itch.v1.13.Dissector] | 7/15/2014 | 5615 | [Deprecated][Omi.Glossary.Status.Deprecated] | [Untested][Omi.Glossary.Testing.Untested] | [pdf][Asx.AsxSecurities.T24.Itch.v1.13.Pdf] |
1010
| [AsxSecurities][AsxSecurities.Exchange] | [Trade][Asx.AsxSecurities.Trade] | [Itch][Omi.Encoding.Itch] | [3.1][Asx.AsxSecurities.Trade.Itch.v3.1.Dissector] | 3/1/2023 | 3146 | [Active][Omi.Glossary.Status.Active] | [Untested][Omi.Glossary.Testing.Untested] | [url][Asx.AsxSecurities.Trade.Itch.v3.1.Url] - [pdf][Asx.AsxSecurities.Trade.Itch.v3.1.Pdf] |
1111
| [AsxSecurities][AsxSecurities.Exchange] | [Trade][Asx.AsxSecurities.Trade] | [Itch][Omi.Encoding.Itch] | [2.0][Asx.AsxSecurities.Trade.Itch.v2.0.Dissector] | 4/1/2015 | 3193 | [Deprecated][Omi.Glossary.Status.Deprecated] | [Untested][Omi.Glossary.Testing.Untested] | [pdf][Asx.AsxSecurities.Trade.Itch.v2.0.Pdf] |
12-
| [AsxSecurities][AsxSecurities.Exchange] | [Trade][Asx.AsxSecurities.Trade] | [Ouch][Omi.Encoding.Ouch] | [3.6][Asx.AsxSecurities.Trade.Ouch.v3.6.Dissector] | 2/1/2023 | 2774 | [Active][Omi.Glossary.Status.Active] | [Untested][Omi.Glossary.Testing.Untested] | [url][Asx.AsxSecurities.Trade.Ouch.v3.6.Url] - [pdf][Asx.AsxSecurities.Trade.Ouch.v3.6.Pdf] |
13-
| [AsxSecurities][AsxSecurities.Exchange] | [Trade][Asx.AsxSecurities.Trade] | [Ouch][Omi.Encoding.Ouch] | [2.0][Asx.AsxSecurities.Trade.Ouch.v2.0.Dissector] | 4/1/2015 | 2751 | [Deprecated][Omi.Glossary.Status.Deprecated] | [Untested][Omi.Glossary.Testing.Untested] | [pdf][Asx.AsxSecurities.Trade.Ouch.v2.0.Pdf] |
12+
| [AsxSecurities][AsxSecurities.Exchange] | [Trade][Asx.AsxSecurities.Trade] | [Ouch][Omi.Encoding.Ouch] | [3.6][Asx.AsxSecurities.Trade.Ouch.v3.6.Dissector] | 2/1/2023 | 2795 | [Active][Omi.Glossary.Status.Active] | [Untested][Omi.Glossary.Testing.Untested] | [url][Asx.AsxSecurities.Trade.Ouch.v3.6.Url] - [pdf][Asx.AsxSecurities.Trade.Ouch.v3.6.Pdf] |
13+
| [AsxSecurities][AsxSecurities.Exchange] | [Trade][Asx.AsxSecurities.Trade] | [Ouch][Omi.Encoding.Ouch] | [2.0][Asx.AsxSecurities.Trade.Ouch.v2.0.Dissector] | 4/1/2015 | 2772 | [Deprecated][Omi.Glossary.Status.Deprecated] | [Untested][Omi.Glossary.Testing.Untested] | [pdf][Asx.AsxSecurities.Trade.Ouch.v2.0.Pdf] |
1414

1515

1616
Asx: [website](https://www.asx.com.au "Go to Australian Securities Exchange")

Cboe/Cboe_ByxEquities_MulticastDepthOfBook_Pitch_v2_41_29_Dissector.lua

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ omi_cboe_byxequities_multicastdepthofbook_pitch_v2_41_29.prefs.show_message_inde
117117

118118
-- Time Offset Display Preferences
119119
cboe_byxequities_multicastdepthofbook_pitch_v2_41_29.time_offset_format = 2 -- 0=Raw, 1=TimeOfDay, 2=FullDateTime
120-
cboe_byxequities_multicastdepthofbook_pitch_v2_41_29.utc_offset_hours = 5 -- Hours behind UTC (EST = 5, EDT = 4, UTC = 0)
120+
cboe_byxequities_multicastdepthofbook_pitch_v2_41_29.utc_offset_hours = 5 -- Hours behind UTC (EST) for midnight calculation
121121

122122
local time_offset_format_enum = {
123123
{ 1, "Raw", 0 },
@@ -126,7 +126,7 @@ local time_offset_format_enum = {
126126
}
127127

128128
omi_cboe_byxequities_multicastdepthofbook_pitch_v2_41_29.prefs.time_offset_format = Pref.enum("Time Offset Format", 2, "Time Offset display format", time_offset_format_enum, false)
129-
omi_cboe_byxequities_multicastdepthofbook_pitch_v2_41_29.prefs.utc_offset_hours = Pref.uint("UTC Offset (hours)", 5, "Hours behind UTC for midnight calculation (EST=5, EDT=4, UTC=0)")
129+
omi_cboe_byxequities_multicastdepthofbook_pitch_v2_41_29.prefs.utc_offset_hours = Pref.uint("UTC Offset (hours)", 5, "Hours behind UTC (EST) for midnight calculation")
130130

131131
-- Handle changed preferences
132132
function omi_cboe_byxequities_multicastdepthofbook_pitch_v2_41_29.prefs_changed()
@@ -1217,14 +1217,14 @@ cboe_byxequities_multicastdepthofbook_pitch_v2_41_29.timestamp.display = functio
12171217
if cboe_byxequities_multicastdepthofbook_pitch_v2_41_29.time_offset_format == 2 and packet then
12181218
local capture_time = type(packet.abs_ts) == "number" and packet.abs_ts or packet.abs_ts:tonumber()
12191219
local utc_offset_seconds = cboe_byxequities_multicastdepthofbook_pitch_v2_41_29.utc_offset_hours * 3600
1220-
local local_midnight = math.floor((capture_time - utc_offset_seconds) / 86400) * 86400 + utc_offset_seconds
1220+
local local_midnight = math.floor((capture_time - utc_offset_seconds) / 86400) * 86400
12211221
local full_seconds = local_midnight + stored_time
12221222

1223-
return "Timestamp: "..os.date("%Y-%m-%d %H:%M:%S.", full_seconds)..string.format("%09d", time_offset)
1223+
return "Timestamp: "..os.date("!%Y-%m-%d %H:%M:%S.", full_seconds)..string.format("%09d", time_offset)
12241224
end
12251225

12261226
-- Time of day mode
1227-
return "Timestamp: "..os.date("%H:%M:%S.", stored_time)..string.format("%09d", time_offset)
1227+
return "Timestamp: "..os.date("!%H:%M:%S.", stored_time)..string.format("%09d", time_offset)
12281228
end
12291229

12301230
-- Composite: Timestamp
@@ -1233,7 +1233,7 @@ cboe_byxequities_multicastdepthofbook_pitch_v2_41_29.timestamp.composite = funct
12331233
local range = buffer(offset, length)
12341234
local time_offset = range:le_uint()
12351235
local value = cboe_byxequities_multicastdepthofbook_pitch_v2_41_29.timestamp.translate(time_offset, stored_time)
1236-
local display = cboe_byxequities_multicastdepthofbook_pitch_v2_41_29.timestamp.display(time_offset, stored_time)
1236+
local display = cboe_byxequities_multicastdepthofbook_pitch_v2_41_29.timestamp.display(time_offset, stored_time, packet)
12371237
parent = parent:add(omi_cboe_byxequities_multicastdepthofbook_pitch_v2_41_29.fields.timestamp, range, value, display)
12381238

12391239
cboe_byxequities_multicastdepthofbook_pitch_v2_41_29.time.generated(stored_time, range, packet, parent)

Cboe/Cboe_ByxEquities_MulticastDepthOfBook_Pitch_v2_41_64_Dissector.lua

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ omi_cboe_byxequities_multicastdepthofbook_pitch_v2_41_64.prefs.show_message_inde
118118

119119
-- Time Offset Display Preferences
120120
cboe_byxequities_multicastdepthofbook_pitch_v2_41_64.time_offset_format = 2 -- 0=Raw, 1=TimeOfDay, 2=FullDateTime
121-
cboe_byxequities_multicastdepthofbook_pitch_v2_41_64.utc_offset_hours = 5 -- Hours behind UTC (EST = 5, EDT = 4, UTC = 0)
121+
cboe_byxequities_multicastdepthofbook_pitch_v2_41_64.utc_offset_hours = 5 -- Hours behind UTC (EST) for midnight calculation
122122

123123
local time_offset_format_enum = {
124124
{ 1, "Raw", 0 },
@@ -127,7 +127,7 @@ local time_offset_format_enum = {
127127
}
128128

129129
omi_cboe_byxequities_multicastdepthofbook_pitch_v2_41_64.prefs.time_offset_format = Pref.enum("Time Offset Format", 2, "Time Offset display format", time_offset_format_enum, false)
130-
omi_cboe_byxequities_multicastdepthofbook_pitch_v2_41_64.prefs.utc_offset_hours = Pref.uint("UTC Offset (hours)", 5, "Hours behind UTC for midnight calculation (EST=5, EDT=4, UTC=0)")
130+
omi_cboe_byxequities_multicastdepthofbook_pitch_v2_41_64.prefs.utc_offset_hours = Pref.uint("UTC Offset (hours)", 5, "Hours behind UTC (EST) for midnight calculation")
131131

132132
-- Handle changed preferences
133133
function omi_cboe_byxequities_multicastdepthofbook_pitch_v2_41_64.prefs_changed()
@@ -1251,14 +1251,14 @@ cboe_byxequities_multicastdepthofbook_pitch_v2_41_64.timestamp.display = functio
12511251
if cboe_byxequities_multicastdepthofbook_pitch_v2_41_64.time_offset_format == 2 and packet then
12521252
local capture_time = type(packet.abs_ts) == "number" and packet.abs_ts or packet.abs_ts:tonumber()
12531253
local utc_offset_seconds = cboe_byxequities_multicastdepthofbook_pitch_v2_41_64.utc_offset_hours * 3600
1254-
local local_midnight = math.floor((capture_time - utc_offset_seconds) / 86400) * 86400 + utc_offset_seconds
1254+
local local_midnight = math.floor((capture_time - utc_offset_seconds) / 86400) * 86400
12551255
local full_seconds = local_midnight + stored_time
12561256

1257-
return "Timestamp: "..os.date("%Y-%m-%d %H:%M:%S.", full_seconds)..string.format("%09d", time_offset)
1257+
return "Timestamp: "..os.date("!%Y-%m-%d %H:%M:%S.", full_seconds)..string.format("%09d", time_offset)
12581258
end
12591259

12601260
-- Time of day mode
1261-
return "Timestamp: "..os.date("%H:%M:%S.", stored_time)..string.format("%09d", time_offset)
1261+
return "Timestamp: "..os.date("!%H:%M:%S.", stored_time)..string.format("%09d", time_offset)
12621262
end
12631263

12641264
-- Composite: Timestamp
@@ -1267,7 +1267,7 @@ cboe_byxequities_multicastdepthofbook_pitch_v2_41_64.timestamp.composite = funct
12671267
local range = buffer(offset, length)
12681268
local time_offset = range:le_uint()
12691269
local value = cboe_byxequities_multicastdepthofbook_pitch_v2_41_64.timestamp.translate(time_offset, stored_time)
1270-
local display = cboe_byxequities_multicastdepthofbook_pitch_v2_41_64.timestamp.display(time_offset, stored_time)
1270+
local display = cboe_byxequities_multicastdepthofbook_pitch_v2_41_64.timestamp.display(time_offset, stored_time, packet)
12711271
parent = parent:add(omi_cboe_byxequities_multicastdepthofbook_pitch_v2_41_64.fields.timestamp, range, value, display)
12721272

12731273
cboe_byxequities_multicastdepthofbook_pitch_v2_41_64.time.generated(stored_time, range, packet, parent)

Cboe/Cboe_BzxEquities_MulticastDepthOfBook_Pitch_v2_41_29_Dissector.lua

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ omi_cboe_bzxequities_multicastdepthofbook_pitch_v2_41_29.prefs.show_message_inde
115115

116116
-- Time Offset Display Preferences
117117
cboe_bzxequities_multicastdepthofbook_pitch_v2_41_29.time_offset_format = 2 -- 0=Raw, 1=TimeOfDay, 2=FullDateTime
118-
cboe_bzxequities_multicastdepthofbook_pitch_v2_41_29.utc_offset_hours = 5 -- Hours behind UTC (EST = 5, EDT = 4, UTC = 0)
118+
cboe_bzxequities_multicastdepthofbook_pitch_v2_41_29.utc_offset_hours = 5 -- Hours behind UTC (EST) for midnight calculation
119119

120120
local time_offset_format_enum = {
121121
{ 1, "Raw", 0 },
@@ -124,7 +124,7 @@ local time_offset_format_enum = {
124124
}
125125

126126
omi_cboe_bzxequities_multicastdepthofbook_pitch_v2_41_29.prefs.time_offset_format = Pref.enum("Time Offset Format", 2, "Time Offset display format", time_offset_format_enum, false)
127-
omi_cboe_bzxequities_multicastdepthofbook_pitch_v2_41_29.prefs.utc_offset_hours = Pref.uint("UTC Offset (hours)", 5, "Hours behind UTC for midnight calculation (EST=5, EDT=4, UTC=0)")
127+
omi_cboe_bzxequities_multicastdepthofbook_pitch_v2_41_29.prefs.utc_offset_hours = Pref.uint("UTC Offset (hours)", 5, "Hours behind UTC (EST) for midnight calculation")
128128

129129
-- Handle changed preferences
130130
function omi_cboe_bzxequities_multicastdepthofbook_pitch_v2_41_29.prefs_changed()
@@ -1176,14 +1176,14 @@ cboe_bzxequities_multicastdepthofbook_pitch_v2_41_29.timestamp.display = functio
11761176
if cboe_bzxequities_multicastdepthofbook_pitch_v2_41_29.time_offset_format == 2 and packet then
11771177
local capture_time = type(packet.abs_ts) == "number" and packet.abs_ts or packet.abs_ts:tonumber()
11781178
local utc_offset_seconds = cboe_bzxequities_multicastdepthofbook_pitch_v2_41_29.utc_offset_hours * 3600
1179-
local local_midnight = math.floor((capture_time - utc_offset_seconds) / 86400) * 86400 + utc_offset_seconds
1179+
local local_midnight = math.floor((capture_time - utc_offset_seconds) / 86400) * 86400
11801180
local full_seconds = local_midnight + stored_time
11811181

1182-
return "Timestamp: "..os.date("%Y-%m-%d %H:%M:%S.", full_seconds)..string.format("%09d", time_offset)
1182+
return "Timestamp: "..os.date("!%Y-%m-%d %H:%M:%S.", full_seconds)..string.format("%09d", time_offset)
11831183
end
11841184

11851185
-- Time of day mode
1186-
return "Timestamp: "..os.date("%H:%M:%S.", stored_time)..string.format("%09d", time_offset)
1186+
return "Timestamp: "..os.date("!%H:%M:%S.", stored_time)..string.format("%09d", time_offset)
11871187
end
11881188

11891189
-- Composite: Timestamp
@@ -1192,7 +1192,7 @@ cboe_bzxequities_multicastdepthofbook_pitch_v2_41_29.timestamp.composite = funct
11921192
local range = buffer(offset, length)
11931193
local time_offset = range:le_uint()
11941194
local value = cboe_bzxequities_multicastdepthofbook_pitch_v2_41_29.timestamp.translate(time_offset, stored_time)
1195-
local display = cboe_bzxequities_multicastdepthofbook_pitch_v2_41_29.timestamp.display(time_offset, stored_time)
1195+
local display = cboe_bzxequities_multicastdepthofbook_pitch_v2_41_29.timestamp.display(time_offset, stored_time, packet)
11961196
parent = parent:add(omi_cboe_bzxequities_multicastdepthofbook_pitch_v2_41_29.fields.timestamp, range, value, display)
11971197

11981198
cboe_bzxequities_multicastdepthofbook_pitch_v2_41_29.time.generated(stored_time, range, packet, parent)

0 commit comments

Comments
 (0)