deliver better timestamps

This commit is contained in:
Jakob Ketterl 2019-07-07 14:09:24 +02:00
parent af315e1671
commit 182a8af57f
2 changed files with 2 additions and 2 deletions

View File

@ -1248,7 +1248,7 @@ function on_ws_recv(evt)
case "wsjt_message":
var msg = json.value;
var $b = $('#openwebrx-panel-wsjt-message tbody');
var t = new Date(msg['timestamp'] * 1000);
var t = new Date(msg['timestamp']);
var pad = function(i) { return ('' + i).padStart(2, "0"); }
$b.append($(
'<tr>' +

View File

@ -121,7 +121,7 @@ class WsjtParser(object):
out = {}
ts = datetime.strptime(msg[0:6], "%H%M%S")
out["timestamp"] = datetime.combine(date.today(), ts.time(), datetime.now().tzinfo).timestamp()
out["timestamp"] = int(datetime.combine(date.today(), ts.time(), datetime.now().tzinfo).timestamp() * 1000)
out["db"] = float(msg[7:10])
out["dt"] = float(msg[11:15])
out["freq"] = int(msg[16:20])