我正在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 ?
发布评论
评论(1)
尝试此
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