#include "QuickTest.h" #include "ICmd.h" #include "lib/config/config.h" #include "lib/config/protos/orders_fills_cleanup.pb.h" #include "lib/orderman/orders/algo/IAlgoServices.h" #include "lib/tracing/PerfLog.h" #include "lib/utils/datetime.h" #include "lib/domain_model/sod.h" #include "lib/utils/datetime.h" #include #include #include #include #include namespace bts { namespace cmd { using namespace bts::orderman; int QuickTest::execute(std::vector const &) { auto sftp_file_name = std::string("2019-08-05.adatmny.csv"); std::regex rx("(\\d\\d\\d\\d)"); std::smatch matches; if (!std::regex_match(sftp_file_name, matches, rx)) return {}; auto y = std::stoi(matches[0]); auto m = std::stoi(matches[1]); auto d = std::stoi(matches[2]); const auto &sod = config::get(); std::cout << datetime::make_ptime(y, m, d, sod.sod_hh(), sod.has_sod_mm(), 0, 0) << "\n"; return 1; } std::string QuickTest::help() { return "This is a place holder to make it easy to quickly write discardable " "test code"; } } // namespace cmd } // namespace bts