taosdata/TDengine

return data downsampled by day/month/year in specified time zone instead of utc

Open

#22,881 创建于 2023年9月13日

在 GitHub 查看
 (2 评论) (0 反应) (0 负责人)C (5,002 fork)batch import
help wantedquestion

仓库指标

Star
 (24,849 star)
PR 合并指标
 (平均合并 1天 1小时) (30 天内合并 4 个 PR)

描述

docker安装的3.0.7.1版本 宿主机和容器的时区均为东八区 image 按小时聚合没问题(以8月1日为例) select _ts,first(pwr_gen) from inverter where device_id=14 and _ts >= 1690819200000 and _ts <= 1690905599000 interval(1h); image 按天聚合时发现,是按utc时间聚合,再显示为当前时区,但数据本质还是utc时间聚合的。(以8月为例) select _wstart,first(pwr_gen) ,last_row(pwr_gen) from inverter where device_id=14 and _ts >= 1690819200000 and _ts <= 1693497599000 interval(1d); image 在查阅资料后参考发现可以使用偏移量 希望可以按当前时区(东八区)聚合,将偏移量设置为16h image 但到按月聚合时,不知道该如何处理了,还是以utc-0来聚合的。希望开始时间可以为utc+8的零点开始。 image 希望interval 查询可以按东八区时间进行聚合,请问可以提供什么好的办法吗

贡献者指南