ja...@bcc190cf-cafb-0310-a4f2-bffc1f526a37  committed a866e2c

Made psycopg2 backend behave the same as the other backends when it comes to unicode and datetime time zone info. See [ the django-dev thread] for details.

  • Participants
  • Parent commits 70c74e2

Comments (0)

Files changed (1)

File django/db/backends/postgresql_psycopg2/

     from django.core.exceptions import ImproperlyConfigured
     raise ImproperlyConfigured, "Error loading psycopg2 module: %s" % e
-# Register Unicode conversions
-import psycopg2.extensions
 DatabaseError = Database.DatabaseError
             self.connection = Database.connect(conn_string)
             self.connection.set_isolation_level(1) # make transactions transparent to all cursors
         cursor = self.connection.cursor()
+        cursor.tzinfo_factory = None
         cursor.execute("SET TIME ZONE %s", [settings.TIME_ZONE])
         if settings.DEBUG:
             return util.CursorDebugWrapper(cursor, self)