Zaw Myo Htet
Zaw Myo Htet

Reputation: 540

InfluxDB query error

I stored one line of record per hour in influx database. Here is my query.

select * from hour_log where city = 'London' and time > '2014-11-14'

According to their documentation query should return data and time above 2014-11-14 00:00 . But it return only 4 row ( 7:00, 8:00., 9:00, and 10:00 ) . It doesn't return data from 01:00 AM to 06:00 AM. And when I run this query.

select * from hour_log where city = 'London' and time > '2014-11-13' and time < '2014-11-14'

It return time between 13-11-2014 7:00 AM to 13-11-2014 6:00 AM. I think something is wrong with query or influxdb.

I am testing this data on influxDB admin. I am using their latest database.

Please, help me. Thanks.

Upvotes: 0

Views: 824

Answers (2)

Taras Kinash
Taras Kinash

Reputation: 61

Is the timezone of the values that you are writing the same as that on the server? I had a similar problem where it seemed that not all or too many data points were returned. It turned out to be a problem with time zone on the server and the time zone of the data points that you are trying to write. For instance if your data is in UTC and the server is somewhere in USA, there is a few hours difference.

Upvotes: 0

Srikanta
Srikanta

Reputation: 1147

If you are trying to query with the default time column then I think you need to mention the time in epoch and not ISO format

Upvotes: 1

Related Questions