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

**URL:** <https://community.influxdata.com/t/saving-data-in-1s-epoc-timestamp-when-influx-expected-1us-resolution-how-to-fix/6953>\
**Category:** Telegraf\
**Created:** [October 9, 2018, 9:47am UTC](https://community.influxdata.com/t/saving-data-in-1s-epoc-timestamp-when-influx-expected-1us-resolution-how-to-fix/6953 "2018-10-09T09:47:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![prelude](https://avatars.discourse-cdn.com/v4/letter/p/ecd19e/32.png) [@prelude](https://community.influxdata.com/u/prelude)\
**Post date:** [October 9, 2018, 9:47am UTC](https://community.influxdata.com/t/saving-data-in-1s-epoc-timestamp-when-influx-expected-1us-resolution-how-to-fix/6953/1 "2018-10-09T09:47:34Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [October 9, 2018, 7:54pm UTC](https://community.influxdata.com/t/saving-data-in-1s-epoc-timestamp-when-influx-expected-1us-resolution-how-to-fix/6953/2 "2018-10-09T19:54:25Z")

</div>

Hello @prelude,

Unfortunately, you will have to pull the data out and rewrite it. I suggest looking at this [old community question](https://community.influxdata.com/t/can-we-change-timestamp-of-series-metrics-at-database-level/621) 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

---

<div class="post-metadata">

**Author:** ![prelude](https://avatars.discourse-cdn.com/v4/letter/p/ecd19e/32.png) [@prelude](https://community.influxdata.com/u/prelude)\
**Post date:** [October 9, 2018, 10:01pm UTC](https://community.influxdata.com/t/saving-data-in-1s-epoc-timestamp-when-influx-expected-1us-resolution-how-to-fix/6953/3 "2018-10-09T22:01:28Z")

</div>

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)
