diff --git a/django/db/backends/mysql/base.py b/django/db/backends/mysql/base.py
index ecbb02f..3fe89af 100644
a
|
b
|
class DatabaseOperations(BaseDatabaseOperations):
|
310 | 310 | |
311 | 311 | def year_lookup_bounds(self, value): |
312 | 312 | # Again, no microseconds |
313 | | first = '%s-01-01 00:00:00' |
314 | | second = '%s-12-31 23:59:59.99' |
315 | | return [first % value, second % value] |
| 313 | first = datetime.datetime(value,1,1,0,0,0) |
| 314 | second = datetime.datetime(value,12,31,23,59,59,99) |
| 315 | return [first, second] |
316 | 316 | |
317 | 317 | def max_name_length(self): |
318 | 318 | return 64 |
diff --git a/django/db/backends/oracle/base.py b/django/db/backends/oracle/base.py
index 9c91baa..7797ebb 100644
a
|
b
|
WHEN (new.%(col_name)s IS NULL)
|
363 | 363 | value.second, value.microsecond) |
364 | 364 | |
365 | 365 | def year_lookup_bounds_for_date_field(self, value): |
366 | | first = '%s-01-01' |
367 | | second = '%s-12-31' |
368 | | return [first % value, second % value] |
| 366 | first = datetime.datetime(value,1,1) |
| 367 | second = datetime.datetime(value,12,31) |
| 368 | return [first, second] |
369 | 369 | |
370 | 370 | def combine_expression(self, connector, sub_expressions): |
371 | 371 | "Oracle requires special cases for %% and & operators in query expressions" |
diff --git a/django/db/backends/sqlite3/base.py b/django/db/backends/sqlite3/base.py
index 7ce9dd3..718d10e 100644
a
|
b
|
class DatabaseOperations(BaseDatabaseOperations):
|
179 | 179 | return unicode(value) |
180 | 180 | |
181 | 181 | def year_lookup_bounds(self, value): |
182 | | first = '%s-01-01' |
183 | | second = '%s-12-31 23:59:59.999999' |
184 | | return [first % value, second % value] |
| 182 | first = datetime.datetime(value,1,1) |
| 183 | second = datetime.datetime(value,12,31,23,59,59,999999) |
| 184 | return [first, second] |
185 | 185 | |
186 | 186 | def convert_values(self, value, field): |
187 | 187 | """SQLite returns floats when it should be returning decimals, |