Commit 1fc7b223 authored by Jérome Perrin's avatar Jérome Perrin

ZMySQLDA: set time_zone session variable to UTC

Our patched MySQLDA assumes that DATE and DATETIME columns are in UTC,
but the TIMESTAMP columns are using mysql's time_zone variable, which
defaults to mysql server system timezone.

Set time_zone session variable at the beginning of each connection so
that TIMESTAMP columns are also UTC.
parent 50a3d68b
......@@ -253,6 +253,7 @@ class DB(TM):
def _forceReconnection(self):
self.db = MySQLdb.connect(**self._kw_args)
self._query("SET time_zone='+00:00'")
def tables(self, rdb=0,
_care=('TABLE', 'VIEW')):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment