From 9a2cf809ed922891ecb570f817bb1dfd20c07846 Mon Sep 17 00:00:00 2001 From: Tyler Perkins Date: Mon, 17 Jan 2022 15:13:05 -0500 Subject: [PATCH] Fix time in homeassistant.cpp to account for timezone --- src/panel/homeassistant.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/panel/homeassistant.cpp b/src/panel/homeassistant.cpp index b35e2ae..dec10b9 100644 --- a/src/panel/homeassistant.cpp +++ b/src/panel/homeassistant.cpp @@ -86,8 +86,6 @@ void homeassistant::update(){ //perform request curl_easy_perform(api_curl); - std::cerr << json_string << "\n"; - //parse the result json_doc.Parse(json_string.c_str()); @@ -213,7 +211,7 @@ std::time_t homeassistant::datestringToTm(const std::string& date_string){ tm_tmp.tm_sec = second; } - return std::mktime(&tm_tmp); + return std::mktime(&tm_tmp) - timezone; } ///////////////////////////////////////