Commit e88cf4ad 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 fd695133
......@@ -314,6 +314,7 @@ class DB(TM):
error=True,
)
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