Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Made psycopg2 backend behave the same as the other backends when it c…

…omes to unicode and datetime time zone info. See [ the django-dev thread] for details.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 0e577430e9c0b0848774227932050db037ae4e75 1 parent 5626416
Jacob Kaplan-Moss jacobian authored
Showing with 1 addition and 4 deletions.
  1. +1 −4 django/db/backends/postgresql_psycopg2/
5 django/db/backends/postgresql_psycopg2/
@@ -11,10 +11,6 @@
from django.core.exceptions import ImproperlyConfigured
raise ImproperlyConfigured, "Error loading psycopg2 module: %s" % e
-# Register Unicode conversions
-import psycopg2.extensions
DatabaseError = Database.DatabaseError
@@ -47,6 +43,7 @@ def cursor(self):
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)
Please sign in to comment.
Something went wrong with that request. Please try again.