mirror of
https://github.com/craigerl/aprsd.git
synced 2024-12-22 01:20:59 -05:00
Fixed admin page packet date
The date timestamp was always showing as 1970. Had to adjust the javascript conversion from epoch to Date object
This commit is contained in:
parent
9582812041
commit
570fdb98a7
@ -111,14 +111,14 @@ function update_packets( data ) {
|
|||||||
pkt = JSON.parse(val);
|
pkt = JSON.parse(val);
|
||||||
|
|
||||||
update_watchlist_from_packet(pkt['from_call'], pkt);
|
update_watchlist_from_packet(pkt['from_call'], pkt);
|
||||||
if ( packet_list.hasOwnProperty(pkt.timestamp) == false ) {
|
if ( packet_list.hasOwnProperty(pkt['timestamp']) == false ) {
|
||||||
// Store the packet
|
// Store the packet
|
||||||
packet_list[pkt.timestamp] = pkt;
|
packet_list[pkt['timestamp']] = pkt;
|
||||||
//ts_str = val["timestamp"].toString();
|
//ts_str = val["timestamp"].toString();
|
||||||
//ts = ts_str.split(".")[0]*1000;
|
//ts = ts_str.split(".")[0]*1000;
|
||||||
ts = pkt.timestamp
|
ts = pkt['timestamp'] * 1000;
|
||||||
var d = new Date(ts).toLocaleDateString("en-US");
|
var d = new Date(ts).toLocaleDateString();
|
||||||
var t = new Date(ts).toLocaleTimeString("en-US");
|
var t = new Date(ts).toLocaleTimeString();
|
||||||
var from_call = pkt.from_call;
|
var from_call = pkt.from_call;
|
||||||
if (from_call == our_callsign) {
|
if (from_call == our_callsign) {
|
||||||
title_id = 'title_tx';
|
title_id = 'title_tx';
|
||||||
|
Loading…
Reference in New Issue
Block a user