Fixed price display for 25hr days

This commit is contained in:
Gunnar Skjold 2023-10-29 09:47:58 +01:00
parent a6d8857655
commit 206c90ca46
4 changed files with 6 additions and 6 deletions

View File

@ -89,7 +89,7 @@ float EntsoeApi::getValueForHour(time_t ts, int8_t hour) {
breakTime(tz->toLocal(ts), tm);
hoursToday++;
}
if(pos >= 48)
if(pos > 49)
return ENTSOE_NO_VALUE;
float value = ENTSOE_NO_VALUE;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -20,12 +20,12 @@
let values = [];
min = max = 0;
let cur = new Date();
addHours(cur, sysinfo.clock_offset);
addHours(cur, sysinfo.clock_offset - ((24 + cur.getHours() - cur.getUTCHours())%24));
for(i = hour; i<24; i++) {
val = json[zeropad(h++)];
if(val == null) break;
xTicks.push({
label: zeropad(cur.getUTCHours())
label: zeropad(cur.getHours())
});
values.push(val*100);
min = Math.min(min, val*100);
@ -36,7 +36,7 @@
val = json[zeropad(h++)];
if(val == null) break;
xTicks.push({
label: zeropad(cur.getUTCHours())
label: zeropad(cur.getHours())
});
values.push(val*100);
min = Math.min(min, val*100);