From: Elena Mamontova Date: Tue, 27 Sep 2016 12:46:10 +0000 (+0300) Subject: Ticket 37. Int2TS() and TS2Int() methods define removed. X-Git-Tag: 2.409~74 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/19175a03297f1e277e56f0eecf84e8994433106e Ticket 37. Int2TS() and TS2Int() methods define removed. --- diff --git a/projects/stargazer/plugins/store/postgresql/postgresql_store_utils.cpp b/projects/stargazer/plugins/store/postgresql/postgresql_store_utils.cpp index f5dec89f..98452429 100644 --- a/projects/stargazer/plugins/store/postgresql/postgresql_store_utils.cpp +++ b/projects/stargazer/plugins/store/postgresql/postgresql_store_utils.cpp @@ -112,35 +112,6 @@ delete[] buf; return 0; } -std::string POSTGRESQL_STORE::Int2TS(time_t ts) const -{ -char buf[32]; -struct tm brokenTime; - -brokenTime.tm_wday = 0; -brokenTime.tm_yday = 0; -brokenTime.tm_isdst = 0; - -gmtime_r(&ts, &brokenTime); - -strftime(buf, 32, "%Y-%m-%d %H:%M:%S", &brokenTime); - -return buf; -} - -time_t POSTGRESQL_STORE::TS2Int(const std::string & ts) const -{ -struct tm brokenTime; - -brokenTime.tm_wday = 0; -brokenTime.tm_yday = 0; -brokenTime.tm_isdst = 0; - -stg_strptime(ts.c_str(), "%Y-%m-%d %H:%M:%S", &brokenTime); - -return stg_timegm(&brokenTime); -} - void POSTGRESQL_STORE::MakeDate(std::string & date, int year, int month) const { struct tm brokenTime;