local time

This commit is contained in:
2026-07-21 21:00:09 +02:00
parent b670a74bb3
commit 267ad99f57
+1 -1
View File
@@ -229,7 +229,7 @@ function handleData(wss, receivedData, rdsWss) {
}).catch((error) => console.log("Error fetching Tx info:", error));
// 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) {
wss.clients.forEach((client) => client.send(dataToSendJSON));
lastUpdateTime = Date.now();