Skip to content

Commit

Permalink
fix(sql): use isoformat for timestamp literals
Browse files Browse the repository at this point in the history
Don't lop off subseconds
  • Loading branch information
cpcloud committed Jun 8, 2022
1 parent 84b0544 commit 70d0ba6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ibis/backends/base/sql/registry/literal.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def _date_literal_format(translator, expr):
def _timestamp_literal_format(translator, expr):
value = expr.op().value
if isinstance(value, datetime.datetime):
value = value.strftime('%Y-%m-%d %H:%M:%S')
value = value.isoformat()

return repr(value)

Expand Down

0 comments on commit 70d0ba6

Please sign in to comment.