diff --git a/VERSION b/VERSION index ab57e398..14573756 100644 --- a/VERSION +++ b/VERSION @@ -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 diff --git a/gluon/dal.py b/gluon/dal.py index 231d54a9..7de57480 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -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)