c++ convert postgres timestamp without time zone to time_t
问题 I'm connecting from c++ to postgreSQL using libpq library. I request and obtain the date (timestamp without time zone) from postgreSQL, but the result has an offset that I don't know how to fix. Postgres table: id date integer timestamp without time zone 29996 2014-02-28 23:59:00 result in C++ code: id: 29996, Date: Sat Mar 01 10:59:00 2014 You can see that the date has the offset. Below is the code that I'm using. Any help will be greatly appreciated PGconn *m_connection; PGresult *res;