Skip to content

Commit bc52abf

Browse files
committed
Fix date
1 parent 32dd670 commit bc52abf

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

_includes/sensor.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<dl>
2-
<dt>Дата оновлення:</dt>
3-
<dd id="sens-date">Н/Д</dd>
42
<dt>Температура:</dt>
53
<dd id="sens-temp">Н/Д</dd>
64
<dt>Вологість:</dt>
@@ -9,6 +7,8 @@
97
<dd id="sens-pres">Н/Д</dd>
108
<dt>Опис:</dt>
119
<dd id="sens-descr">Н/Д</dd>
10+
<dt>Час оновлення:</dt>
11+
<dd id="sens-date">Н/Д</dd>
1212
</dl>
1313

1414
<canvas

assets/js/main.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,9 @@ async function drawChart() {
196196

197197
const ctx = document.getElementById("sens-chart").getContext("2d");
198198

199-
jsonData.labels = jsonData.labels.map((label) => formatDateTime(label));
199+
jsonData.labels = jsonData.labels.map((label) =>
200+
formatDateTime(new Date(label))
201+
);
200202

201203
new Chart(ctx, {
202204
type: "line",

0 commit comments

Comments
 (0)