From 92790ddca64b493328bb4e2c959fa02009b8f3c4 Mon Sep 17 00:00:00 2001 From: pdxlocations Date: Fri, 24 Jan 2025 08:35:39 -0800 Subject: [PATCH] use local time for timestamp --- message_handlers/rx_handler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/message_handlers/rx_handler.py b/message_handlers/rx_handler.py index cff5842..b821dd1 100644 --- a/message_handlers/rx_handler.py +++ b/message_handlers/rx_handler.py @@ -3,6 +3,7 @@ from utilities.utils import get_node_list, decimal_to_hex, get_name_from_number import globals from ui.curses_ui import draw_packetlog_win, draw_node_list, draw_messages_window, draw_channel_list, add_notification from db_handler import save_message_to_db, maybe_store_nodeinfo_in_db +import time from datetime import datetime @@ -68,7 +69,7 @@ def on_receive(packet, interface): globals.all_messages[globals.channel_list[channel_number]] = [] # Timestamp handling - current_timestamp = int(packet['rxTime']) # Use the packet's rxTime for timestamp + current_timestamp = time.time() current_hour = datetime.fromtimestamp(current_timestamp).strftime('%Y-%m-%d %H:00') # Retrieve the last timestamp if available