| 31 | using json = nlohmann::ordered_json; |
| 32 | |
| 33 | static std::string format_time(const std::chrono::system_clock::time_point & now, const std::string & format) { |
| 34 | auto time = std::chrono::system_clock::to_time_t(now); |
| 35 | auto local_time = *std::localtime(&time); |
| 36 | std::ostringstream ss; |
| 37 | ss << std::put_time(&local_time, format.c_str()); |
| 38 | auto res = ss.str(); |
| 39 | return res; |
| 40 | } |
| 41 | |
| 42 | static json safe_args_parse(const std::string & to_parse) { |
| 43 | std::string stripped = to_parse; |
no test coverage detected