david / semanticdjango (http://semanticdjango.org/)

fork of django-trunk

The right time for a semantic contrib, that's my pony.

Clone this repository (size: 23.1 MB): HTTPS / SSH
$ hg clone http://code.welldev.org/semanticdjango
commit 6484: 531bfe72e1f8
parent 6483: 8877745cfdb3
branch: default
Fixed #9275: Extended the Oracle date format to allow DATE columns to be used with DateTimeFields, especially when using legacy databases. Thanks to hollerith for the patch.
ikelly
19 months ago

Changed (Δ11 bytes):

raw changeset »

django/db/backends/oracle/base.py (1 lines added, 1 lines removed)

Up to file-list django/db/backends/oracle/base.py:

@@ -269,7 +269,7 @@ class DatabaseWrapper(BaseDatabaseWrappe
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])