# Wrong timestamp

**URL:** <https://community.influxdata.com/t/wrong-timestamp/5573>\
**Category:** Telegraf\
**Tags:** influxdb\
**Created:** [June 18, 2018, 3:00am UTC](https://community.influxdata.com/t/wrong-timestamp/5573 "2018-06-18T03:00:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![amartina](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@amartina](https://community.influxdata.com/u/amartina)\
**Post date:** [June 18, 2018, 3:00am UTC](https://community.influxdata.com/t/wrong-timestamp/5573/1 "2018-06-18T03:00:59Z")

</div>

Hello all, this is my first post.  
I’m having trouble writing old timestamps, and i’m kinda lost about what is wrong.  
I have a file “salida.txt” with  
“airTempL,host=SanRoque value=12.92 1529240400000  
airTempL,host=SanRoque value=13.92 1529241600000  
airTempL,host=SanRoque value=14.36 1529242800000  
airTempL,host=SanRoque value=14.27 1529244060000”

and using python to store the data  
os.system(“curl -i -XPOST ‘[http://localhost:8086/write?db=ldsDB](http://localhost:8086/write?db=ldsDB)’ --data-binary ‘@salida.txt’”)

but stored data shows wrong timestamp  
[  
“1970-01-01T00:25:29.2404Z”,  
“SanRoque”,  
12.92  
],  
[  
“1970-01-01T00:25:29.2416Z”,  
“SanRoque”,  
13.92  
],  
[  
“1970-01-01T00:25:29.2428Z”,  
“SanRoque”,  
14.36  
],  
[  
“1970-01-01T00:25:29.24406Z”,  
“SanRoque”,  
14.27  
]

Any thoughts??  
thank you

---

<div class="post-metadata">

**Author:** ![sidgod](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/sidgod/32/1861_2.png) [@sidgod](https://community.influxdata.com/u/sidgod)\
**Post date:** [June 18, 2018, 2:18pm UTC](https://community.influxdata.com/t/wrong-timestamp/5573/2 "2018-06-18T14:18:17Z")

</div>

By default InfluxDB treats timestamps as nanoseconds since epoc as per documentation - [InfluxDB HTTP API reference | InfluxDB OSS 1.5 Documentation](https://docs.influxdata.com/influxdb/v1.5/tools/api/#write)

Nanoseconds will be a 20 digit number, that you are passing is milliseconds since epoc so that appears to be very small number when treated as a nanoseconds. You have two options to fix it:

Option 1: Pass nanoseconds since epoc instead of milliseconds  
Option 2: Set precision as milliseconds as per documentation

Cheers!
