Мой запрос Jooq:
dslContext.select(
timeInterval,
ifnull(avg(field(FieldName.AVERAGE, Double.class))
.cast(Double.class), 0.0))
.from(channelTimebucketQuery)
.groupBy(timeInterval)
.orderBy(timeInterval)
.collect(Collectors.toMap(Record2::component1, Record2::component2));
возвращает метку времени с привязанным к ней часовым поясом и двойное значение
Но мой профилировщик говорит, что он должен вернуться метка времени без часового пояса.
select pg_typeof(time_bucket) from (
select "alias_67258973"."time_bucket", coalesce(cast(avg(average) as double precision), 0.0) from (select "public"."time_bucket_gapfill"("bucket_width" := cast("public"."create_interval"("seconds" := 43200) as "pg_catalog"."interval"), "ts" := cast("public"."testTable"."time" as timestamp), "start" := cast(null as timestamp), "finish" := cast(null as timestamp)) as "time_bucket", avg("public"."testTable"."average") as "average" from "testTable" where ("public"."testTable"."device" in ('702088' ) and "public"."testTable"."time" >= timestamp '2020-02-10 13:57:28.2212375' and "public"."testTable"."time" <= timestamp '2020-02-24 13:57:28.2222399') group by time_bucket) as "alias_67258973" group by "alias_67258973"."time_bucket" order by "alias_67258973"."time_bucket"
) as x;
Откуда берется часовой пояс? Как мне получить часовой пояс до + 0000