You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/10/17 03:21:13 UTC

[GitHub] [iotdb] hyoHhh opened a new issue, #7630: 时间戳只能使用毫秒

hyoHhh opened a new issue, #7630:
URL: https://github.com/apache/iotdb/issues/7630

           IoTDB默认使用毫秒, 但是其实IoTDB内部是用的long进行存储的,因此可以通过配置来支持微秒和纳秒。
   在IoTDB配置文件(iotdb-engine.properties)中的如下配置:
   ```
   # Use this value to set timestamp precision as "ms", "us" or "ns".
   # Once the precision is been set, it can not be changed.
   timestamp_precision=ms
   ```
   这样的话,你传入一个long时间戳,就会将其按照微秒或者纳秒解读了。
   不过目前的版本中 `now()`返回的是毫秒值, 所以如果将`timestamp_precision`设置为`us`或者`ns`,那么时间将来解析成人类可读的时间(yyyy-mm-dd HH:MM:ss)就会不太对。 这个会马上加PR修复。
   
   By default, IoTDB considers a long timestamp as millisecond time unit, but you can change it in iotdb-engine.properties: `timestamp_precision=us` or `timestamp_precision=ns`.
   
   But currently, `now()` function only returns `ms`.
   
   _Originally posted by @jixuan1989 in https://github.com/apache/iotdb/issues/1276#issuecomment-634542829_
         


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] hyoHhh commented on issue #7630: 时间戳只能使用毫秒

Posted by GitBox <gi...@apache.org>.
hyoHhh commented on issue #7630:
URL: https://github.com/apache/iotdb/issues/7630#issuecomment-1296228121

   > 应该在0.12/0.13版本就支持了,可以尝试一下。
   
   用的就是13.2版本,14版本支持,我试了,要自己编译


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] HTHou commented on issue #7630: 时间戳只能使用毫秒

Posted by GitBox <gi...@apache.org>.
HTHou commented on issue #7630:
URL: https://github.com/apache/iotdb/issues/7630#issuecomment-1280265561

   应该在0.12/0.13版本就支持了,可以尝试一下。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] HTHou closed issue #7630: 时间戳只能使用毫秒

Posted by GitBox <gi...@apache.org>.
HTHou closed issue #7630: 时间戳只能使用毫秒
URL: https://github.com/apache/iotdb/issues/7630


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org