X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/0d5bff91a33dc190351adc0010f8218c81423799..ac3670b33981698a02c5e95ab4f11cb3fe57562d:/projects/stargazer/plugins/store/postgresql/postgresql_store_utils.cpp diff --git a/projects/stargazer/plugins/store/postgresql/postgresql_store_utils.cpp b/projects/stargazer/plugins/store/postgresql/postgresql_store_utils.cpp index ef705053..9a5101e1 100644 --- a/projects/stargazer/plugins/store/postgresql/postgresql_store_utils.cpp +++ b/projects/stargazer/plugins/store/postgresql/postgresql_store_utils.cpp @@ -113,35 +113,6 @@ delete[] buf; return 0; } -std::string POSTGRESQL_STORE::Int2TS(time_t ts) const -{ -struct tm brokenTime; - -brokenTime.tm_wday = 0; -brokenTime.tm_yday = 0; -brokenTime.tm_isdst = 0; - -gmtime_r(&ts, &brokenTime); - -char buf[32]; -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;