Commit 28e97a9b authored by Aymeric Augustin's avatar Aymeric Augustin
Browse files

Cleaned up init_connection_state in the psycopg2 backend.

settings_dict['TIME_ZONE'] is set in ConnectionHandler.ensure_defaults.
parent 76356d96
Loading
Loading
Loading
Loading
+18 −19
Original line number Diff line number Diff line
@@ -186,10 +186,9 @@ class DatabaseWrapper(BaseDatabaseWrapper):
        return connection

    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:

        tz = self.settings_dict['TIME_ZONE']
        try:
            get_parameter_status = self.connection.get_parameter_status
        except AttributeError: