mirror of
https://github.com/KubaPro010/fm-dx-webserver.git
synced 2026-07-31 17:29:19 +02:00
local time
This commit is contained in:
@@ -229,7 +229,7 @@ function handleData(wss, receivedData, rdsWss) {
|
|||||||
}).catch((error) => console.log("Error fetching Tx info:", error));
|
}).catch((error) => console.log("Error fetching Tx info:", error));
|
||||||
|
|
||||||
// Send the updated data to the client
|
// Send the updated data to the client
|
||||||
const dataToSendJSON = JSON.stringify({...dataToSend, timestamp: Math.floor(Date.now() / 1000)});
|
const dataToSendJSON = JSON.stringify({...dataToSend, timestamp: Math.floor(Date.now() / 1000) - new Date().getTimezoneOffset() * 60});
|
||||||
if (currentTime - lastUpdateTime >= updateInterval) {
|
if (currentTime - lastUpdateTime >= updateInterval) {
|
||||||
wss.clients.forEach((client) => client.send(dataToSendJSON));
|
wss.clients.forEach((client) => client.send(dataToSendJSON));
|
||||||
lastUpdateTime = Date.now();
|
lastUpdateTime = Date.now();
|
||||||
|
|||||||
Reference in New Issue
Block a user