this should do the job

This commit is contained in:
Robin Müller 2024-04-08 13:35:06 +02:00
parent de84bf112b
commit 3ae6ccfb77

View File

@ -122,6 +122,12 @@ def handle_event_packet( # noqa C901: Complexity okay here
new_time_dt = datetime.datetime.fromtimestamp(new_time, datetime.timezone.utc) new_time_dt = datetime.datetime.fromtimestamp(new_time, datetime.timezone.utc)
pw.dlog(f"Old time (UTC): {old_time_dt}") pw.dlog(f"Old time (UTC): {old_time_dt}")
pw.dlog(f"New time (UTC): {new_time_dt}") pw.dlog(f"New time (UTC): {new_time_dt}")
if info.name == "CLOCK_DUMP_LEGACY":
specific_handler = True
# param 1 is timeval seconds, param 2 is timeval subsecond milliseconds
time = event_def.param1 + event_def.param2 / 1000.0
time_dt = datetime.datetime.fromtimestamp(time, datetime.timezone.utc)
pw.dlog(f"Current time: {time_dt}")
if info.name == "CLOCK_DUMP": if info.name == "CLOCK_DUMP":
specific_handler = True specific_handler = True
# param 1 is timeval seconds, param 2 is timeval subsecond microseconds # param 1 is timeval seconds, param 2 is timeval subsecond microseconds