Code Monkey home page Code Monkey logo

Comments (4)

jixuan1989 avatar jixuan1989 commented on May 10, 2024

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.

from iotdb.

jixuan1989 avatar jixuan1989 commented on May 10, 2024

#1290 会解决这个问题,并在0.10中发布。
PR 1290 will solve the issue and be released in v0.10.0

from iotdb.

OrdinarySK avatar OrdinarySK commented on May 10, 2024

请问这个问题解决了嘛,我在v0.12版本中更改配置为ns,但是启动服务会报错 提示改成ms

from iotdb.

jixuan1989 avatar jixuan1989 commented on May 10, 2024

from iotdb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.