Skip to content

Commit 63e7910

Browse files
authored
enh: ws support timezone (#361)
* chore: update Cargo.lock * feat: add timezone support in connection and queries, with tests for default and custom timezones * feat: enhance timezone handling in Cursor and TaosResult, add comprehensive tests for default and custom timezones * feat: tmq support timezone * fix: handle pytz import failure gracefully in to_py_datetime function * feat: enhance datetime handling in to_py_datetime function with improved timezone support and fallback warnings * fix: set default address to localhost if none provided in Consumer configuration * ci: set timezone * refactor: extract warning logic into separate function for missing timezone libraries * chore: update taos dependency branch from 'enh/TD-36874' to 'main' in Cargo.toml
1 parent 38ee119 commit 63e7910

File tree

10 files changed

+577
-163
lines changed

10 files changed

+577
-163
lines changed

.github/workflows/taos-ws-py-compatibility.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ jobs:
9393
sudo mkdir -p /etc/taos
9494
sudo cp ./.github/workflows/taos.cfg /etc/taos/taos.cfg
9595
96+
- name: Set timezone
97+
run: sudo timedatectl set-timezone Asia/Shanghai
98+
9699
- name: Start TDengine
97100
run: |
98101
taosd &

.github/workflows/taos-ws-py.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ jobs:
196196
ls -alh /etc/taos/
197197
cd ../../
198198
199+
- name: Set timezone
200+
run: sudo timedatectl set-timezone Asia/Shanghai
201+
199202
- name: Start TDengine 3.0
200203
run: |
201204
tree TDengine_v3/build/build/

taos-ws-py/Cargo.lock

Lines changed: 103 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

taos-ws-py/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ crate-type = ["cdylib"]
1111
[dependencies]
1212
anyhow = "1"
1313
chrono = "0.4"
14+
chrono-tz = "0.10.4"
15+
iana-time-zone = "0.1.63"
1416
log = "0.4"
1517
pretty_env_logger = "0.5"
1618
rustls = "=0.21.7"

0 commit comments

Comments
 (0)