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

Imprecise timestamp added with write_points #822

Open
@lifeisawavesorideit

Description

@lifeisawavesorideit
  • InfluxDB version: e.g. 1.7.6
  • InfluxDB-python version: e.g. 5.3.0
  • Python version: e.g. 3.7.4
  • Operating system version: Windows 10

I'm having issues with the precision of the timestamp in nanoseconds when trying to save it to the InfluxDB.

The last 3 rows of my dataframe look as follows:

Timestamp Value
2019-10-09 11:20:38.253 260.30697
2019-10-09 11:20:38.255 260.44757
2019-10-09 11:20:38.257 260.59392

where the Timestamp is set as index with df.index = pd.to_datetime(df.index, unit='ns').

When writing the endpoints to Influx the timestamps with write_points() I obtain following data inserted:
1570620038252999936 260.30697
1570620038255000064 260.44757
1570620038256999936 260.59392

There seems to be someting wrong when writing the data to the InfluxDB. The expected results should look something like:
1570620038253000000 260.30697
1570620038255000000 260.44757
1570620038257000000 260.59392

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions