Browse Source

fix year conversion for local time in javascript file

Helmut Pozimski 5 years ago
parent
commit
d9ff786fc7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      html/script.js

+ 1 - 1
html/script.js

@@ -14,7 +14,7 @@ function addZero(num) {
 function getSystemTime() {
 	date = new Date();
 	element = document.getElementById("local");
-	element.innerText = date.getDate() + "." + (date.getMonth() + 1) + "." + date.getYear() + " " + addZero(date.getHours()) + ":" + addZero(date.getMinutes()) + ":" + addZero(date.getSeconds());
+	element.innerText = date.getDate() + "." + (date.getMonth() + 1) + "." + (date.getYear() + 1900) + " " + addZero(date.getHours()) + ":" + addZero(date.getMinutes()) + ":" + addZero(date.getSeconds());
 }
 
 function getAlarm() {