1
0
mirror of https://github.com/beestat/app.git synced 2026-05-13 10:52:29 -04:00

Fixed #164 - Convert recent activity to chart2

Also: Fixed #177, Fixed #91, Fixed #86, Fixed #40. Big changes.
This commit is contained in:
Jon Ziebell
2019-12-16 21:34:01 -05:00
parent 03a40da867
commit 7adfcb4b34
20 changed files with 2084 additions and 2203 deletions
+8
View File
@@ -622,6 +622,14 @@ class runtime_thermostat extends cora\crud {
throw new \Exception('Max range is 30 days.', 10205);
}
// Accept timestamps in roughly any format; always convert back to something nice and in UTC
if (is_array($attributes['timestamp']['value']) === true) {
$attributes['timestamp']['value'][0] = date('c', strtotime($attributes['timestamp']['value'][0]));
$attributes['timestamp']['value'][1] = date('c', strtotime($attributes['timestamp']['value'][1]));
} else {
$attributes['timestamp']['value'] = date('c', strtotime($attributes['timestamp']['value']));
}
// Read the data.
$runtime_thermostats = $this->database->read(
'runtime_thermostat',