Skip to content
Snippets Groups Projects
Commit 7773dc6d authored by BAHJI's avatar BAHJI
Browse files

[ICATHALES-382] Fix allSocketMessages timestamp format + fix updating list if timestamp to false

parent 101a8d5e
No related branches found
No related tags found
1 merge request!3[PIController] Add PIAxis commands and attributes
...@@ -170,8 +170,11 @@ void BoxController::compute_socket_messages_logs() ...@@ -170,8 +170,11 @@ void BoxController::compute_socket_messages_logs()
if(socket_msg !="") if(socket_msg !="")
{ {
yat::String is_timestamp = m_dict_historic_config.get("timestamp").value_or("TRUE");
std::transform(is_timestamp.begin(), is_timestamp.end(), is_timestamp.begin(), ::toupper);
std::vector<std::string> parsed_args; std::vector<std::string> parsed_args;
if(m_socket_messages_vect.size()!=0) if(m_socket_messages_vect.size()!=0 && (is_timestamp == "TRUE"))
{ {
yat::StringUtil::match(m_socket_messages_vect.at(0), "* - *", &parsed_args); yat::StringUtil::match(m_socket_messages_vect.at(0), "* - *", &parsed_args);
if(socket_msg == parsed_args.at(1)) if(socket_msg == parsed_args.at(1))
...@@ -181,10 +184,8 @@ void BoxController::compute_socket_messages_logs() ...@@ -181,10 +184,8 @@ void BoxController::compute_socket_messages_logs()
} }
yat::CurrentTime t; yat::CurrentTime t;
yat::String date_format = m_dict_historic_config.get("format").value_or("%Y-%m-%dT%H:%M:%S"); //We force date_format value to "%Y-%m-%dT%H:%M:%S" format otherwise we got uppper/lower case problems
yat::String is_timestamp = m_dict_historic_config.get("timestamp").value_or("TRUE"); yat::String date_format = m_dict_historic_config.get("formate").value_or("%Y-%m-%dT%H:%M:%S");
std::transform(is_timestamp.begin(), is_timestamp.end(), is_timestamp.begin(), ::toupper);
std::stringstream socket_msg_timestamp(""); std::stringstream socket_msg_timestamp("");
if(is_timestamp == "TRUE") if(is_timestamp == "TRUE")
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment