QuestDB Python Time.Time()中的时间戳不起作用

发布于 2025-02-13 13:54:26 字数 853 浏览 1 评论 0 原文

我正在QuestDB中构建数据库。

我设置了一个表,一列是时间戳。

关于表= https://questdb.io/docs/guides/guides/working/working/working/working/working/working/working/working/working/working/working/working/working/working/working/working - 与Timestamps timezones/

时间戳列自动转换1623167145123456至'2021-06-08T16:45:45.123456Z'。

Doc说: QuestDB使用的本机时间戳格式是微秒分辨率中的Unix时间戳。 QuestDB不将时区信息与时间戳值一起存储,因此应假定所有时间戳都在UTC中。下面的示例显示了微秒中的Unix时间戳如何直接传递到时间戳列 时,

当我尝试发送此列时,

time.time()

它无法正常工作。

python time.time()= 1657105707.8171313 doc输入= 1623167145123456

当删除此空白时python time.time()并将其发送到时间戳列 输出是:

2495-02-11T11:02:24.069445Z

ı应该做什么?

ı am building a database in QuestDB.

ı set up a table and one column is timestamp.

docs about table = https://questdb.io/docs/guides/working-with-timestamps-timezones/

timestamp column is converting automaticly 1623167145123456 to '2021-06-08T16:45:45.123456Z'.

doc say :
The native timestamp format used by QuestDB is a Unix timestamp in microsecond resolution. QuestDB does not store time zone information alongside timestamp values and therefore it should be assumed that all timestamps are in UTC. The following example shows how a Unix timestamp in microseconds may be passed into a timestamp column directly

when ı try to send this column

time.time()

it's not working.

Python time.time() = 1657105707.8171313
doc input = 1623167145123456

when ı delete this blank in python time.time() and send this to timestamp column
output is :

2495-02-11T11:02:24.069445Z

what should ı do ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

半衾梦 2025-02-20 13:54:26

尝试此 int(time.time() * 1000000000)

它在此示例将开放数据从TFL发送到QuestDB

Try this out int(time.time() * 1000000000)

It is working for me in this example to send open data from TFL to QuestDB

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文