Skip to content

armgit / dbx

Public Imported from GitHub
0

25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。

fix(iotdb): bundle timezone data in native agent

t8y2cc7112b240f0
diff --git a/agents/drivers/iotdb/main.go b/agents/drivers/iotdb/main.go
index 0e2358c5cd..0e6ad483e6 100644
--- a/agents/drivers/iotdb/main.go
+++ b/agents/drivers/iotdb/main.go
@@ -12,6 +12,7 @@ import (
"strings"
"sync"
"time"
+ _ "time/tzdata"
)
const (
diff --git a/agents/drivers/iotdb/main_test.go b/agents/drivers/iotdb/main_test.go
index 33e0ac527f..a7c6564c46 100644
--- a/agents/drivers/iotdb/main_test.go
+++ b/agents/drivers/iotdb/main_test.go
@@ -60,6 +60,25 @@ func TestParseConnectionConfig(t *testing.T) {
}
}
+func TestBundledTimeZoneDatabase(t *testing.T) {
+ dataSet, err := client.NewIoTDBRpcDataSet(
+ "", nil, nil, nil, true, false, 0, 0, nil, 0, nil, 0, nil,
+ "Asia/Shanghai", "default", 1000, nil,
+ )
+ if err != nil {
+ t.Fatal(err)
+ }
+ if dataSet == nil {
+ t.Fatal("expected IoTDB dataset with bundled timezone data")
+ }
+ if _, err := client.NewIoTDBRpcDataSet(
+ "", nil, nil, nil, true, false, 0, 0, nil, 0, nil, 0, nil,
+ "Invalid/Zone", "default", 1000, nil,
+ ); err == nil {
+ t.Fatal("expected invalid timezone to remain rejected")
+ }
+}
+
func TestParseConnectionConfigTLS(t *testing.T) {
config, err := parseConnectionConfig(connectParams{
Host: "iotdb.example.com", SSL: true, CACertPath: "/tmp/ca.pem",