Fix bad datetime conversion

This commit is contained in:
Daniel García Aubert 2017-06-21 20:19:02 +02:00
parent 6bfedef7eb
commit 6f7cb75256

View File

@ -155,7 +155,10 @@ var dateHistogramQueryTpl = dot.template([
' CASE WHEN min_val = max_val',
' THEN 0',
' ELSE GREATEST(1, LEAST(',
' WIDTH_BUCKET({{=it._column}}::timestamp AT TIME ZONE \'{{=it._timezone}}\', bins_array),',
' WIDTH_BUCKET(',
' {{=it._column}}::timestamp WITHOUT TIME ZONE AT TIME ZONE \'{{=it._timezone}}\',',
' bins_array',
' ),',
' bins_number',
' )) - 1',
' END AS bin,',