# HG changeset patch # User Sylvain Thénault # Date 1302848558 -7200 # Node ID a60522259c2c82dd6ca4c217d750c085f41d44fe # Parent 9d04e12d2d39c34f52b1e5f22c415065412a4505 [tz postgres support] we've to commit the connection once time-zone is set, else we may loose the setting diff -r 9d04e12d2d39 -r a60522259c2c server/sqlutils.py --- a/server/sqlutils.py Fri Apr 15 08:18:59 2011 +0200 +++ b/server/sqlutils.py Fri Apr 15 08:22:38 2011 +0200 @@ -335,6 +335,9 @@ def init_postgres_connexion(cnx): cnx.cursor().execute('SET TIME ZONE UTC') + # commit is needed, else setting are lost if the connection is first + # rollbacked + cnx.commit() postgres_hooks = SQL_CONNECT_HOOKS.setdefault('postgres', []) postgres_hooks.append(init_postgres_connexion)