Set the PostgreSQL session timezone to 'UTC'
authorMichael Marley <michael@michaelmarley.com>
Mon, 20 Apr 2015 16:43:53 +0000 (12:43 -0400)
committerManuel Nickschas <sputnick@quassel-irc.org>
Tue, 21 Apr 2015 20:38:45 +0000 (22:38 +0200)
commit7bdf962fa7c6fae511798d20109a86cd6edbffe0
tree22e86ad76f6e705137a693b3c22dccb4174e7a08
parent585ef1dab1790c7edb7c73df801560ba6b7842d1
Set the PostgreSQL session timezone to 'UTC'

With Qt5, the PostgreSQL driver will transparently convert times
to the database's timezone before inserting.  Because the default
is 'localtime', this causes the local time to be stored in the DB
instead of the UTC time.  This in turn causes the time displayed
in the client to be wrong by the same offset as that timezone's
offset.  To fix the issue, just make sure the PostgreSQL is in the
'UTC' timezone, so the passed UTC time will not be converted.
src/core/postgresqlstorage.cpp