Compare commits
2 Commits
2a7ccc7e5f
...
07230e1ef3
Author | SHA1 | Date | |
---|---|---|---|
|
07230e1ef3 | ||
|
f35aeb592b |
@ -28,7 +28,7 @@ function buildTable(data, offset = 0) {
|
||||
color = "tempNormal";
|
||||
}
|
||||
|
||||
const parsedDate = luxon.DateTime.fromISO(log.date).setZone("Europe/Copenhagen").setLocale("gb");
|
||||
const parsedDate = luxon.DateTime.fromISO(log.date, { zone: "UTC" }).setZone("Europe/Copenhagen").setLocale("gb");
|
||||
const date = parsedDate.toLocaleString(luxon.DateTime.DATE_SHORT);
|
||||
const time = parsedDate.toLocaleString(luxon.DateTime.TIME_WITH_SECONDS);
|
||||
|
||||
@ -139,7 +139,7 @@ async function fetchData() {
|
||||
},
|
||||
adapters: {
|
||||
date: {
|
||||
zone: "Europe/Copenhagen",
|
||||
zone: "system",
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -163,7 +163,7 @@ async function fetchData() {
|
||||
backgroundColor: `rgba(${color}, 1.0)`,
|
||||
borderColor: `rgba(${color}, 0.1)`,
|
||||
data: dataset.map(log => ({
|
||||
x: new Date(log.date).getTime(),
|
||||
x: luxon.DateTime.fromISO(log.date, { zone: "UTC" }).toMillis(),
|
||||
y: log.temperature,
|
||||
})),
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user