Fix error subtracting time zone diff to time set command
This commit is contained in:
parent
fa0ba6be31
commit
99f073ba84
1 changed files with 1 additions and 1 deletions
|
|
@ -955,7 +955,7 @@ class PlejBLEHandler extends EventEmitter {
|
|||
`Plejd clock time off by more than 1 minute. Reported time: ${plejdTime.toString()}, diff ${diffSeconds} seconds. Time will be set hourly.`,
|
||||
);
|
||||
if (this.connectedDevice && deviceId === this.connectedDevice.id) {
|
||||
const newLocalTimestamp = (now.getTime() - offsetSecondsGuess) / 1000;
|
||||
const newLocalTimestamp = now.getTime() / 1000 - offsetSecondsGuess;
|
||||
logger.info(`Setting time to ${now.toString()}`);
|
||||
const payload = Buffer.alloc(10);
|
||||
// E.g: 00 0110 001b 38df2360 00
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue