mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-25 23:06:11 +02:00
changed timestamp to UTC in ESP only, local timezone is calculated by browser thx @homeautomation22
This commit is contained in:
parent
6ed2dfde9c
commit
72219cdf17
5 changed files with 37 additions and 55 deletions
|
@ -76,8 +76,16 @@
|
|||
}
|
||||
|
||||
var ts = div(["ts"]);
|
||||
var date = new Date(iv["ts_last_success"] * 1000);
|
||||
ts.innerHTML = "Last received data requested at: " + date.toLocaleString('de-DE', {timeZone: 'UTC'});
|
||||
var ageInfo = "Last received data requested at: ";
|
||||
if(iv["ts_last_success"] > 0) {
|
||||
var date = new Date(iv["ts_last_success"] * 1000);
|
||||
ageInfo += date.toLocaleString('de-DE');
|
||||
}
|
||||
else
|
||||
ageInfo += "nothing received";
|
||||
|
||||
ts.innerHTML = ageInfo;
|
||||
|
||||
main.appendChild(ts);
|
||||
ivHtml.push(main);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue