push @sql_location, qq{
select
- to_char(time, 'YYYY-MM-DD HH24:MI:SS') as time, x_axis_angle + $offset_x as x_axis_angle, y_axis_angle + $offset_y as y_axis_angle, sensor_temperature, power_source_voltage, zc.pn
+ timezone('UTC-2'::text, "time") AS "time", x_axis_angle + $offset_x as x_axis_angle, y_axis_angle + $offset_y as y_axis_angle, sensor_temperature, power_source_voltage, zc.pn
from zc
where pn = $pn $time
};
create or replace view sub_$filter as
}, join(' union ', @sql_location) . qq{
order by 1 asc
+;
+grant select on sub_$filter to grafana;
};
+