Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

…omes to unicode and datetime time zone info. See [http://groups.google.com/group/django-developers/browse_frm/thread/4575a3fe0d78e2e4/d607d96f7b422620#d607d96f7b422620 the django-dev thread] for details.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3675 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 0e577430e9c0b0848774227932050db037ae4e75 1 parent 5626416
Jacob Kaplan-Moss authored August 28, 2006
5  django/db/backends/postgresql_psycopg2/base.py
@@ -11,10 +11,6 @@
11 11
     from django.core.exceptions import ImproperlyConfigured
12 12
     raise ImproperlyConfigured, "Error loading psycopg2 module: %s" % e
13 13
 
14  
-# Register Unicode conversions
15  
-import psycopg2.extensions
16  
-psycopg2.extensions.register_type(psycopg2.extensions.UNICODE)
17  
-
18 14
 DatabaseError = Database.DatabaseError
19 15
 
20 16
 try:
@@ -47,6 +43,7 @@ def cursor(self):
47 43
             self.connection = Database.connect(conn_string)
48 44
             self.connection.set_isolation_level(1) # make transactions transparent to all cursors
49 45
         cursor = self.connection.cursor()
  46
+        cursor.tzinfo_factory = None
50 47
         cursor.execute("SET TIME ZONE %s", [settings.TIME_ZONE])
51 48
         if settings.DEBUG:
52 49
             return util.CursorDebugWrapper(cursor, self)

0 notes on commit 0e57743

Please sign in to comment.
Something went wrong with that request. Please try again.