dal parse_date should always return date, issue 1344, thanks Niphlod
This commit is contained in:
@@ -1 +1 @@
|
||||
Version 2.4.1-alpha.2+timestamp.2013.03.02.12.54.01
|
||||
Version 2.4.1-alpha.2+timestamp.2013.03.02.12.55.37
|
||||
|
||||
@@ -1890,6 +1890,8 @@ class BaseAdapter(ConnectionPool):
|
||||
return value == True or str(value)[:1].lower() == 't'
|
||||
|
||||
def parse_date(self, value, field_type):
|
||||
if isinstance(value, datetime.datetime):
|
||||
return value.date()
|
||||
if not isinstance(value, (datetime.date,datetime.datetime)):
|
||||
(y, m, d) = map(int, str(value)[:10].strip().split('-'))
|
||||
value = datetime.date(y, m, d)
|
||||
|
||||
Reference in New Issue
Block a user