Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Timestamps slightly different in Influxdb #344

Closed
hirochri opened this issue Jun 20, 2016 · 2 comments · Fixed by #811
Closed

Timestamps slightly different in Influxdb #344

hirochri opened this issue Jun 20, 2016 · 2 comments · Fixed by #811

Comments

@hirochri
Copy link

hirochri commented Jun 20, 2016

Occasionally my data arrives in the database with timestamps that are ever so slightly ahead or behind the time they actually should be, and I have been having trouble tracking down where this behavior is coming from!

I am using a pandas dataframe with a datetime index, which is being written to the database using write_points (No specified time precision). The timestamps within the dataframe are numpy datetime64[ns]'s and Influx's default time precision is also nanoseconds iirc. What often happens though is that the timestamps in the database are slightly different and looks like it possibly has to do with floats? (My problem is similar to this, as queries based on time now miss 1 or 2 data points)

For instance, this is how the following timestamps change:

datetime64[ns] --> unix timestamp in Influxdb
2016-06-20 13:35:42.270000 --> 1466429742270000128
2016-06-20 14:02:49.770000 --> 1466431369769999872

If anyone could clarify why this behavior is happening or point me in the right direction of how to fix it, that would be greatly appreciated, thanks!

Edit: After glancing at the other possible issues, it may very well be related to Issue 340

@hirochri hirochri changed the title Timestamps slightly different in Timestamps slightly different in Influxdb Jun 20, 2016
@inselbuch
Copy link

this is still a problem... it is simply not possible to reliably overwrite data by specifying the exact same timestamp

@nargiza-sarkulova
Copy link

I also experienced this problem. I'm very much interested in answer.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants