def init_connection_state(self):
        settings_dict = self.settings_dict
        self.connection.set_client_encoding('UTF8')
        tz = 'UTC' if settings.USE_TZ else settings_dict.get('TIME_ZONE')
        if tz:
            try:
                get_parameter_status = self.connection.get_parameter_status
            except __HOLE__:
                # psycopg2 < 2.0.12 doesn't have get_parameter_status
                conn_tz = None
            else:
                conn_tz = get_parameter_status('TimeZone')

            if conn_tz != tz:
                self.connection.cursor().execute(
                        self.ops.set_time_zone_sql(), [tz])
                # Commit after setting the time zone (see #17062)
                self.connection.commit()
        self.connection.set_isolation_level(self.isolation_level)
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Django-1.6.10/django/db/backends/postgresql_psycopg2/base.py/DatabaseWrapper.init_connection_state