Skip to content

Commit

Permalink
Added 3 seconds to time set for account for delay
Browse files Browse the repository at this point in the history
  • Loading branch information
jLynx committed Jan 8, 2024
1 parent a2d3329 commit 55b7e80
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/components/Controller/Controller.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ const Controller = () => {

const setDeviceTime = () => {
const currentDateTime: Date = new Date();
// Add 3 seconds to the current time to account for the time it takes to send the command
currentDateTime.setSeconds(currentDateTime.getSeconds() + 3);
const year: number = currentDateTime.getFullYear();
let month: string | number = currentDateTime.getMonth() + 1; // JavaScript months are 0-11
let day: string | number = currentDateTime.getDate();
Expand Down

0 comments on commit 55b7e80

Please sign in to comment.