Fix time in homeassistant.cpp to account for timezone

This commit is contained in:
Tyler Perkins 2022-01-17 15:13:05 -05:00
parent 9018d83868
commit 9a2cf809ed
1 changed files with 1 additions and 3 deletions

View File

@ -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;
}
///////////////////////////////////////