diff --git a/examples/common/config/OcppConfig.cpp b/examples/common/config/OcppConfig.cpp index 3c53f5a9..6c4db9be 100644 --- a/examples/common/config/OcppConfig.cpp +++ b/examples/common/config/OcppConfig.cpp @@ -200,8 +200,8 @@ ocpp::types::ConfigurationStatus OcppConfig::setConfiguration(const std::string& std::size_t key_is_interval = key.find("Interval"); if (key_is_interval != std::string::npos) { - std::size_t value_is_negative = key.find("-"); - if (value_is_negative) + std::size_t value_is_negative = value.find("-"); + if (value_is_negative != std::string::npos) { ret = ConfigurationStatus::Rejected; } diff --git a/src/rpc/RpcBase.cpp b/src/rpc/RpcBase.cpp index 65afaa16..dcfd978a 100644 --- a/src/rpc/RpcBase.cpp +++ b/src/rpc/RpcBase.cpp @@ -231,6 +231,7 @@ void RpcBase::start() { // Start reception thread m_requests_queue.setEnable(true); + m_results_queue.setEnable(true); m_rx_thread = new std::thread(std::bind(&RpcBase::rxThread, this)); } } diff --git a/src/types/DateTime.h b/src/types/DateTime.h index 1ba8f79f..13a67006 100644 --- a/src/types/DateTime.h +++ b/src/types/DateTime.h @@ -84,7 +84,6 @@ class DateTime m_datetime = _mkgmtime(&t); #else // _MSC_VER m_datetime = std::mktime(&t); - m_datetime += t.tm_gmtoff; m_datetime -= (t.tm_isdst * 3600); #endif // _MSC_VER ret = true; @@ -179,7 +178,7 @@ class DateTime #ifdef _MSC_VER gmtime_s(&t, &m_datetime); #else // _MSC_VER - gmtime_r(&m_datetime, &t); + localtime_r(&m_datetime, &t); #endif // _MSC_VER ss << std::put_time(&t, "%Y-%m-%dT%TZ"); return ss.str();