cubicweb #4916284 AttributeError: 'datetime.datetime' object has no attribute 'days' [open]

Following RQL request in a MSQLSERVER instance of a customer app crashes with given traceback:

Any (NOW-D),T,D,O ORDERBY 1 DESC WHERE T is CWWorkerTask,
T operation O,T in_state S, S name 'task_assigned',
TRI to_state S, TRI creation_date D,TRI wf_info_for T

Traceback:

AttributeError: 'datetime.datetime' object has no attribute 'days'
'datetime.datetime' object has no attribute 'days'
File \\xxx\cubicweb\web\application.py, line 456, function core_handle:
  result = controller.publish(rset=rset)
[+] File \\xxx\cubicweb\web\views\basecontrollers.py, line 136, function publish:
  rset=rset, view=view)
[+] File \\xxx\cubicweb\cwvreg.py, line 398, function main_template:
  res = obj.render(**kwargs)
[+] File \\xxx\cubicweb\view.py, line 137, function render:
  view_func(**context)
[+] File \\xxx\cubicweb\web\views\basetemplates.py, line 147, function call:
  view.render(w=w)
[+] File \\xxx\cubicweb\view.py, line 137, function render:
  view_func(**context)
[+] File \\xxx\cubicweb\web\views\tableview.py, line 625, function call:
  super(RsetTableView, self).call(**kwargs)
[+] File \\xxx\cubicweb\web\views\tableview.py, line 450, function call:
  self.layout_render(self.w)
[+] File \\xxx\cubicweb\web\component.py, line 276, function layout_render:
  layout.render(w)
[+] File \\xxx\cubicweb\web\views\tableview.py, line 209, function render:
  self.render_table(w, actions, self.view.paginable)
[+] File \\xxx\cubicweb\web\views\tableview.py, line 250, function render_table:
  self.render_table_body(w, colrenderers)
[+] File \\xxx\cubicweb\web\views\tableview.py, line 229, function render_table_body:
  self.render_row(w, rownum, colrenderers)
[+] File \\xxx\cubicweb\web\views\tableview.py, line 265, function render_row:
  self.render_cell(w, rownum, colnum, renderer)
[+] File \\xxx\cubicweb\web\views\tableview.py, line 280, function render_cell:
  renderer.render_cell(w, rownum)
[+] File \\xxx\cubicweb\web\views\tableview.py, line 523, function render_cell:
  row=rownum, col=self.colid, w=w)
[+] File \\xxx\cubicweb\req.py, line 349, function view:
  return view.render(w=w, **kwargs)
[+] File \\xxx\cubicweb\view.py, line 137, function render:
  view_func(**context)
[+] File \\xxx\cubicweb\web\views\baseviews.py, line 150, function cell_call:
  value = self._cw.printable_value(etype, value, props)
[+] File \\xxx\cubicweb\req.py, line 361, function printable_value:
  return as_string(value, self, props, displaytime)
[+] File \\xxx\cubicweb\uilib.py, line 102, function print_timedelta:
  if value.days > 730 or value.days < -730: # 2 years
prioritynormal
typebug
done in<not specified>
closed by<not specified>