Saving data in 1s epoc timestamp when influx expected 1us resolution...how to fix?

I have gathered data in last 8 month and database in now about 25GB. Last night i tried to visualize it with grafana and puzzled why it not work before i noticed that i have saved data with wrong timestamp whole time. See below:

select last(Var01) from "TEST"
name: TEST
time       last
----       ----
1539078061 0.0002889

precision rfc3339

select last(Var01) from "TEST"
name: TEST
time                           last
----                           ----
1970-01-01T00:00:01.539078121Z 0.0002889

Is there a way to fix timestamps (i assume that equation is something like: newTimeStamp = 1000 000*oldTimeStamp IF there in not any clever way to do it) directly in influx CLI or should i write short python script for it?

Hello @prelude,

Unfortunately, you will have to pull the data out and rewrite it. I suggest looking at this old community question to understand why that is. Luckily, writing a short script for it isn’t cumbersome…I’ve been there before…

Does this help?

Best,

Anais

Seems that i find a solution. It still processing data but test series went fine so i assume that it’s working.

First i exported data with "influx_inspect export " and i got nice 338GB output file. Then i imported it back with “influx -import -path=data.txt -precision=s” command.

I let you know if it’s not work as expected. (Likely it’s ready in morning)