Skip to content

Commit

Permalink
Merge pull request #464 from EverythingMe/fix/time_field_serialize
Browse files Browse the repository at this point in the history
Fix #463: support for datetime.time and datetime.timedelta fields
  • Loading branch information
arikfr committed Jun 29, 2015
2 parents 6c6c025 + f5ea3e9 commit 98ff701
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion redash/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def default(self, o):
if isinstance(o, decimal.Decimal):
return float(o)

if isinstance(o, datetime.date):
if isinstance(o, (datetime.date, datetime.time, datetime.timedelta)):
return o.isoformat()

super(JSONEncoder, self).default(o)
Expand Down

0 comments on commit 98ff701

Please sign in to comment.