From 9bd75bdf74f86c8bb2517dd2a9618dadd5fe4904 Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Thu, 18 Apr 2024 15:56:28 +0200 Subject: [PATCH 1/2] #13083 fixed tz time acoustic console --- pandora_console/operation/events/sound_events.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pandora_console/operation/events/sound_events.php b/pandora_console/operation/events/sound_events.php index 6511afb7f5..42ff6af0cb 100644 --- a/pandora_console/operation/events/sound_events.php +++ b/pandora_console/operation/events/sound_events.php @@ -437,7 +437,7 @@ function check_event_sound() { let element_time = $(this) .children(".li-hidden") .val(); - let obj_time = new Date(element_time); + let obj_time = new Date(element_time * 1000); let current_dt = new Date(); let timestamp = current_dt.getTime() - obj_time.getTime(); timestamp = timestamp / 1000; @@ -492,13 +492,13 @@ function check_event_sound() { // Remove audio. remove_audio(); var urlSound = '../../include/sounds/'+$('#sound_id :selected').val(); - console.log(urlSound) + // Apend audio. add_audio(urlSound); // Add elements. data.forEach(function(element) { - console.log(element); + var li = document.createElement("li"); var b64 = btoa(JSON.stringify(element)); li.insertAdjacentHTML( @@ -519,7 +519,7 @@ function check_event_sound() { ); li.insertAdjacentHTML( "beforeend", - '' + '' ); $("#tabs-sound-modal .elements-discovered-alerts ul").prepend(li); }); From bec0c2e4952f5d1e4c4f2d705a73c37c3af10ff1 Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Thu, 18 Apr 2024 16:20:03 +0200 Subject: [PATCH 2/2] #13083 fixed tz time acoustic console --- pandora_console/include/javascript/pandora_events.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/javascript/pandora_events.js b/pandora_console/include/javascript/pandora_events.js index fc8f4dd3dc..fd20082b9c 100644 --- a/pandora_console/include/javascript/pandora_events.js +++ b/pandora_console/include/javascript/pandora_events.js @@ -1345,7 +1345,7 @@ function check_event_sound(settings) { let element_time = $(this) .children(".li-hidden") .val(); - let obj_time = new Date(element_time); + let obj_time = new Date(element_time * 1000); let current_dt = new Date(); let timestamp = current_dt.getTime() - obj_time.getTime(); timestamp = timestamp / 1000; @@ -1427,7 +1427,7 @@ function check_event_sound(settings) { li.insertAdjacentHTML( "beforeend", '' ); $("#tabs-sound-modal .elements-discovered-alerts ul").prepend(li);