# Timestamp issue in elasticsearch!

**URL:** <https://discuss.elastic.co/t/timestamp-issue-in-elasticsearch/57073>\
**Category:** Elasticsearch\
**Created:** [August 3, 2016, 6:27am UTC](https://discuss.elastic.co/t/timestamp-issue-in-elasticsearch/57073 "2016-08-03T06:27:03Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![gugansankar](https://avatars.discourse-cdn.com/v4/letter/g/e274bd/32.png) [@gugansankar](https://discuss.elastic.co/u/gugansankar)\
**Post date:** [August 3, 2016, 6:27am UTC](https://discuss.elastic.co/t/timestamp-issue-in-elasticsearch/57073/1 "2016-08-03T06:27:03Z")

</div>

No idea, why elasticsearch have a 4 hours delay in storing logs. In what basis it retrives the date settings ?.

When I restarted the elasticsearch cluster and checked the logs, timestamp printed on the logs too have delayed timestamp value.

```
> [2016-08-03 02:17:29,117][INFO][http] [node2] bound_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish_address {inet[/172.20.1.100:9200]}
> [2016-08-03 02:17:29,118][INFO][node] [node2] started
> ^C
> [root@Srv1 ~]# date
> Wed Aug 3 06:18:24 GMT 2016
> [root@Srv1 ~]# 

```

In logs timestamp printed as " **2016-08-03 02:17:29**". But the server has a timestamp value of **"Wed Aug 3 06:18:24 GMT 2016"**

Please someone share your inputs. Thanks in Advance.

---

<div class="post-metadata">

**Author:** ![joeywen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joeywen/32/22455_2.png) [@joeywen](https://discuss.elastic.co/u/joeywen)\
**Post date:** [August 3, 2016, 6:32am UTC](https://discuss.elastic.co/t/timestamp-issue-in-elasticsearch/57073/2 "2016-08-03T06:32:14Z")

</div>

Have you convert the timestamp to UTC time ?? You can convert the timestamp to UTC first and then index the data to es .

---

<div class="post-metadata">

**Author:** ![gugansankar](https://avatars.discourse-cdn.com/v4/letter/g/e274bd/32.png) [@gugansankar](https://discuss.elastic.co/u/gugansankar)\
**Post date:** [August 3, 2016, 6:39am UTC](https://discuss.elastic.co/t/timestamp-issue-in-elasticsearch/57073/3 "2016-08-03T06:39:04Z")

</div>

fyi, the problem only with this node. I have one more node which doesn't have any issue.

I have a 2 node cluster setup with central logstash server to push data to nodes.

Actual Setup :  
Logstash-server ------\> Node 1  
|  
Node 2

Last night , Node 1 server has some network issue. So I just point the logstash server to "Node 2". After a while, I noticed all my logs are stored with 4 hours delay. means, my current logs will appear in kibana dashboard after 4 hours.

My suspection is with elasticsearch, As you can see the same delayed timestamp value in elasticsearch log file.

---

<div class="post-metadata">

**Author:** ![gugansankar](https://avatars.discourse-cdn.com/v4/letter/g/e274bd/32.png) [@gugansankar](https://discuss.elastic.co/u/gugansankar)\
**Post date:** [August 4, 2016, 6:28am UTC](https://discuss.elastic.co/t/timestamp-issue-in-elasticsearch/57073/4 "2016-08-04T06:28:08Z")

</div>

Any suggestions ?. Still I'm unable to fix this issue.

---

<div class="post-metadata">

**Author:** ![PilatusB4](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@PilatusB4](https://discuss.elastic.co/u/PilatusB4)\
**Post date:** [August 4, 2016, 7:19am UTC](https://discuss.elastic.co/t/timestamp-issue-in-elasticsearch/57073/5 "2016-08-04T07:19:10Z")

</div>

when you build timestamp do you use +-HH:MM at the end of your timestamp to set time in UTC according to your location ?  
for example : "2016-08-03 02:17:29+02:00"

---

<div class="post-metadata">

**Author:** ![gugansankar](https://avatars.discourse-cdn.com/v4/letter/g/e274bd/32.png) [@gugansankar](https://discuss.elastic.co/u/gugansankar)\
**Post date:** [August 4, 2016, 7:58am UTC](https://discuss.elastic.co/t/timestamp-issue-in-elasticsearch/57073/6 "2016-08-04T07:58:24Z")

</div>

Sorry , I didn't get your point.

I would like to know , why the elasticsearch timestamp is set to different one [with 4 hours delay] . even my server is set with correct value. From where it gets this value ?.

How can I fix this timestamp issue on this node without disturbing the cluster ?.

---

<div class="post-metadata">

**Author:** ![gugansankar](https://avatars.discourse-cdn.com/v4/letter/g/e274bd/32.png) [@gugansankar](https://discuss.elastic.co/u/gugansankar)\
**Post date:** [August 13, 2016, 5:22am UTC](https://discuss.elastic.co/t/timestamp-issue-in-elasticsearch/57073/7 "2016-08-13T05:22:04Z")

</div>

still I'm unable to fix the issue. Anyone can help on this?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 10:27pm UTC](https://discuss.elastic.co/t/timestamp-issue-in-elasticsearch/57073/8 "2017-07-05T22:27:54Z")

</div>


