From a8562b687878f2c08999fe6c163bb3cdcda415e1 Mon Sep 17 00:00:00 2001 From: Jon Ziebell Date: Mon, 4 Nov 2019 20:41:09 -0500 Subject: [PATCH] Fixed #178 - Time change and why it sucks: A novel --- api/runtime_thermostat.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/api/runtime_thermostat.php b/api/runtime_thermostat.php index 1dc54f2..c4f7e63 100755 --- a/api/runtime_thermostat.php +++ b/api/runtime_thermostat.php @@ -329,7 +329,11 @@ class runtime_thermostat extends cora\crud { 'timestamp' => [ 'value' => [ $this->get_utc_datetime( - $columns_begin['date'] . ' ' . $columns_begin['time'], + date( + 'Y-m-d H:i:s', + strtotime($columns_begin['date'] . ' ' . $columns_begin['time'] . ' -1 hour') + ), + // $columns_begin['date'] . ' ' . $columns_begin['time'], $thermostat['time_zone'] ), $this->get_utc_datetime(