Fix using Date.now() where date object is required
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Luca 2021-12-24 18:04:05 +01:00
parent eec9d73e61
commit 1364fd793b
1 changed files with 5 additions and 3 deletions

View File

@ -91,12 +91,14 @@
content += render(talk); content += render(talk);
} }
const time = new Date();
document.getElementById("list").innerHTML = content; document.getElementById("list").innerHTML = content;
const hours = `${now.getHours()}`.padStart(2, '0'); const hours = `${time.getHours()}`.padStart(2, '0');
const minutes = `${now.getMinutes()}`.padStart(2, '0'); const minutes = `${time.getMinutes()}`.padStart(2, '0');
document.getElementById("time").innerText = `${hours}:${minutes}`; document.getElementById("time").innerText = `${hours}:${minutes}`;
setTimeout(main, (60-new Date().getSeconds())*1000+500); setTimeout(main, (60-time.getSeconds())*1000+500);
} }
</script> </script>
</head> </head>