realDateTime hotfix

This commit is contained in:
Divlo 2019-08-17 14:13:43 +02:00
parent 4987734cde
commit 15bba4aef2

View File

@ -337,8 +337,14 @@ function showDateTime(enteredOffset) {
// Affiche l'heure en temps réel
function realDateTime(id)
{
timeNow = new Date;
showDateTime();
realDateTimeNow = new Date;
year = realDateTimeNow.getFullYear();
month = ('0'+(realDateTimeNow.getMonth()+1)).slice(-2);
day = ('0'+realDateTimeNow.getDate()).slice(-2);
hour = ('0'+realDateTimeNow.getHours()).slice(-2);
minute = ('0'+realDateTimeNow.getMinutes()).slice(-2);
second = ('0'+realDateTimeNow.getSeconds()).slice(-2);
resultat = hour + ":" + minute + ":" + second;
document.getElementById(id).innerHTML = resultat;