Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.0.X] Fixed #9275: Extended the Oracle date format to allow DATE co…

…lumns to be used with DateTimeFields, especially when using legacy databases. Thanks to hollerith for the patch. Backport of [9779] from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9780 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit ca777ab08cbadd8fe0f36a3baf69440c5aa9fa6d 1 parent 709476a
Ian Kelly authored January 19, 2009

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  django/db/backends/oracle/base.py
2  django/db/backends/oracle/base.py
@@ -269,7 +269,7 @@ def _cursor(self, settings):
269 269
             cursor = FormatStylePlaceholderCursor(self.connection)
270 270
             # Set oracle date to ansi date format.  This only needs to execute
271 271
             # once when we create a new connection.
272  
-            cursor.execute("ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD' "
  272
+            cursor.execute("ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD HH24:MI:SS' "
273 273
                            "NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD HH24:MI:SS.FF'")
274 274
             try:
275 275
                 self.oracle_version = int(self.connection.version.split('.')[0])

0 notes on commit ca777ab

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