X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/ac3670b33981698a02c5e95ab4f11cb3fe57562d..0c44f5eccee758235a5f2c6229995e3863481c34:/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 9a5101e1..98452429 100644 --- a/projects/stargazer/plugins/store/postgresql/postgresql_store_utils.cpp +++ b/projects/stargazer/plugins/store/postgresql/postgresql_store_utils.cpp @@ -26,15 +26,14 @@ * */ -#include "postgresql_store.h" - -#include "stg/common.h" - #include #include #include +#include "stg/common.h" +#include "postgresql_store.h" + extern volatile time_t stgTime; int POSTGRESQL_STORE::StartTransaction() const @@ -94,10 +93,10 @@ int error = 0; char * buf = new char[(value.length() << 1) + 1]; PQescapeStringConn(connection, - buf, - value.c_str(), - value.length(), - &error); + buf, + value.c_str(), + value.length(), + &error); if (error) { @@ -132,6 +131,8 @@ if (year) else { time_t curTime = stgTime; + /*time(&curTime);*/ + localtime_r(&curTime, &brokenTime); } @@ -143,3 +144,4 @@ strftime(buf, 32, "%Y-%m-%d", &brokenTime); date = buf; } +