taosdata/TDengine

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

Open

#22,881 opened on 2023年9月13日

GitHub で見る
 (2 comments) (0 reactions) (0 assignees)C (5,002 forks)batch import
help wantedquestion

Repository metrics

Stars
 (24,849 stars)
PR merge metrics
 (平均マージ 1d 1h) (30d で 4 merged PRs)

説明

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 查询可以按东八区时间进行聚合,请问可以提供什么好的办法吗

コントリビューターガイド