Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3.1.0.0: 客户端taosRestful访问,database/sql Scan timestamp列,时间异常 #190

Open
git-az opened this issue Aug 26, 2023 · 2 comments

Comments

@git-az
Copy link

git-az commented Aug 26, 2023

var r sql.NullTime
rows.Scan(&r)

ts := r.(*sql.NullTime)
if ts.Valid {
last := &ts.Time
}

last 时间不是数据点的时间戳,database的时间精度为 us

@sangshuduo
Copy link
Contributor

请提供完整的可以复现问题的代码和用于示例问题的建库建表语句

@git-az
Copy link
Author

git-az commented Oct 1, 2023

对timestamp类型的列进行Scan就会出现

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants