Giter Site home page Giter Site logo

Comments (6)

xtutu avatar xtutu commented on July 22, 2024

@Nymph-fan
时间一般存的是一个整数类型,你存的多少,就是多少。
只要你都是以国际标准时间来存储以及显示,或者都以utc8来存储与显示,就不会出现这个问题。

具体的关系,可以看这篇文章:
http://xtutu.me/the-date-object-in-js/

虽然是js写的,但是原理是一样的。

from influxdb-handbook.

ToView avatar ToView commented on July 22, 2024

influxdb存储数据的时间是系统时区的UTC时间。假如东八区14:00插入数据,那么查出来的结果,time显示为6:00。

from influxdb-handbook.

AIJIJI avatar AIJIJI commented on July 22, 2024

好像目前还做不到

from influxdb-handbook.

xigang avatar xigang commented on July 22, 2024

时间戳不需要设置,只要在查询的时设置时区就可以了。
eg:

SELECT mean("value") FROM "cpu" GROUP BY region, time(1d) fill(0) tz('America/Chicago')

from influxdb-handbook.

netyjq avatar netyjq commented on July 22, 2024

时间戳不需要设置,只要在查询的时设置时区就可以了。
eg:

SELECT mean("value") FROM "cpu" GROUP BY region, time(1d) fill(0) tz('America/Chicago')

为什么我这样操作,没有效果

from influxdb-handbook.

diamondboy avatar diamondboy commented on July 22, 2024

时间戳不需要设置,只要在查询的时设置时区就可以了。
eg:

SELECT mean("value") FROM "cpu" GROUP BY region, time(1d) fill(0) tz('America/Chicago')

为什么我这样操作,没有效果

因为influx是Go语言写的,如果你是windows平台下使用tz()无效,需要安装部署Go环境并且设置go的环境变量就可以了。

from influxdb-handbook.

Related Issues (3)

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.