X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fhttp%2Fpages%2Fboardspage.cpp;h=43870cec605c50e6b56af4b06fd6c6d423e40a05;hb=dec33c63afafabf83c3039e916725cac6faef9b3;hp=4adab89bd6fe0f3f4f14e1b8bbd005188aeeda94;hpb=9b22dd53fe62e312c1647310b7ec43aa127090af;p=fms.git diff --git a/src/http/pages/boardspage.cpp b/src/http/pages/boardspage.cpp index 4adab89..43870ce 100644 --- a/src/http/pages/boardspage.cpp +++ b/src/http/pages/boardspage.cpp @@ -1,6 +1,8 @@ #include "../../../include/http/pages/boardspage.h" #include "../../../include/stringfunctions.h" -#include "../../../include/datetime.h" + +#include +#include #ifdef XMEM #include @@ -41,8 +43,7 @@ const std::string BoardsPage::GeneratePage(const std::string &method, const std: std::string startrowstr="0"; std::string boardsearch=""; std::string sql=""; - DateTime now; - now.SetToGMTime(); + Poco::DateTime now; if(queryvars.find("formaction")!=queryvars.end()) { @@ -58,7 +59,7 @@ const std::string BoardsPage::GeneratePage(const std::string &method, const std: SQLite3DB::Statement addst=m_db->Prepare("INSERT INTO tblBoard(BoardName,BoardDescription,DateAdded,AddedMethod) VALUES(?,?,?,?);"); addst.Bind(0,boardname); addst.Bind(1,boarddescription); - addst.Bind(2,now.Format("%Y-%m-%d %H:%M:%S")); + addst.Bind(2,Poco::DateTimeFormatter::format(now,"%Y-%m-%d %H:%M:%S")); addst.Bind(3,"Added manually"); addst.Step(); } @@ -260,7 +261,7 @@ const std::string BoardsPage::GeneratePage(const std::string &method, const std: content+="* If you uncheck this box, any new messages you download that are posted to this board will be discarded."; content+="

"; - return "HTTP/1.1 200 OK\r\nContent-Type: text/html\r\n\r\n"+StringFunctions::Replace(m_template,"[CONTENT]",content); + return StringFunctions::Replace(m_template,"[CONTENT]",content); } const bool BoardsPage::WillHandleURI(const std::string &uri)