@@ -117,7 +117,7 @@ omi_cboe_byxequities_multicastdepthofbook_pitch_v2_41_29.prefs.show_message_inde
117117
118118-- Time Offset Display Preferences
119119cboe_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
122122local time_offset_format_enum = {
123123 { 1 , " Raw" , 0 },
@@ -126,7 +126,7 @@ local time_offset_format_enum = {
126126}
127127
128128omi_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
132132function 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 )
12281228end
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 )
0 commit comments