diff --git a/dm-cli/Deals.cpp b/dm-cli/Deals.cpp index b42cdd9..53e9487 100644 --- a/dm-cli/Deals.cpp +++ b/dm-cli/Deals.cpp @@ -10,6 +10,7 @@ #include "cleanHtml.h" #include #include +#include using namespace std; @@ -53,7 +54,7 @@ int Deals::HelpDealNegative() const PrintFile(DEAL_NEGATIVE_EN); return 0; } -Deals::Deals(const InputParser &parser, const bool isRussian, const string address, bool isDebug) +Deals::Deals(const InputParser& parser, const bool isRussian, const string address, bool isDebug) { this->parser = parser; this->isRussian = isRussian; @@ -131,6 +132,7 @@ int Deals::Create() } else { + pay = GetDate(pay); string untl(",\"until\": \""); untl.append(pay); untl.append("\""); @@ -144,7 +146,7 @@ int Deals::Create() } else { - + leave_before = GetDate(leave_before); string untl(",\"feedback\": {\"leave-before\": \""); untl.append(leave_before); untl.append("\"}"); @@ -168,6 +170,49 @@ int Deals::Create() return 0; } +string Deals::GetDate(const string date) { + string buffer = date; + /* + -p|--pay { [hh:mm:ss UTC] |