InfluxDB API - Http POST resquest - Timestamp precision problem

I am trying to write data to the InfluxDB API via http POST requests. But I am having problems with the precision used for the timestamps of the data entry.

  • Currently I have specified on the request url the precision as ns - nanoseconds: “http://localhost:8086/api/v2/write?org=Org&bucket=TestBucket&precision=ns
  • When I specify the timestamp value on the request:
    Request Body: “Sensor1 temperature=25 1719918964444000000”
    The sent timestamp (1719918964444000000) should result in: 2024-07-02T11:16:04.444Z.
    But in influxDB I get the timestamp: 2024-07-02T11:16:10.000Z:
  • When I don’t specify a timestamp value:
    Request Body: “Sensor1 temperature=27”
    I don’t get the supposed timestamp.
    From Response Headers - Date, I see that the request was made at Tue, 02 Jul 2024 13:05:37 GMT and on influxDB I get 2024-07-02T13:05:40.000Z.

There seems to be some rounding of the timestamp values but I can’t understand why, since I specify on the url a nanoseconds precision. Could this problem be originated by some configuration on influxDB side?

Thanks in advance :slight_smile:

@star_board
What happens when you write that one line directly through the UI?
Sensor1 temperature=25 1719918964444000000

Can you share your cURL? Maybe theres something there im not seeing?

that’s odd.

Are you accidentally applying and aggWindow?