From 482d79abe3ba64bf5a2ded7a560f541b08ae2e74 Mon Sep 17 00:00:00 2001 From: Jon Ziebell Date: Mon, 18 Nov 2019 22:03:05 -0500 Subject: [PATCH] Fixed #190 - Daylight savings breaks sync (redux) --- api/runtime_thermostat.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api/runtime_thermostat.php b/api/runtime_thermostat.php index 338e2b4..0f1b098 100755 --- a/api/runtime_thermostat.php +++ b/api/runtime_thermostat.php @@ -340,7 +340,10 @@ class runtime_thermostat extends cora\crud { $thermostat['time_zone'] ), $this->get_utc_datetime( - $columns_end['date'] . ' ' . $columns_end['time'], + date( + 'Y-m-d H:i:s', + strtotime($columns_end['date'] . ' ' . $columns_end['time'] . ' +1 hour') + ), $thermostat['time_zone'] ) ],