# Logstash id fetching different date / time stamp from DB

**URL:** <https://discuss.elastic.co/t/logstash-id-fetching-different-date-time-stamp-from-db/73513>\
**Category:** Logstash\
**Created:** [February 1, 2017, 12:34pm UTC](https://discuss.elastic.co/t/logstash-id-fetching-different-date-time-stamp-from-db/73513 "2017-02-01T12:34:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![elasticheart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elasticheart/32/65189_2.png) [@elasticheart](https://discuss.elastic.co/u/elasticheart)\
**Post date:** [February 1, 2017, 12:34pm UTC](https://discuss.elastic.co/t/logstash-id-fetching-different-date-time-stamp-from-db/73513/1 "2017-02-01T12:34:03Z")

</div>

Hi,

I am fetching data from postgres table which contains 2 date fields. The result JSON (fetched using Kibana) is like below;

```
{
  "_index": "mylogs-2017-02-01",
  "_type": "logs",
  "_id": "AVn5ff7dDzMvfhs004x9",
  "_score": null,
  "_source": {
	"error_name": "error1",
	"request": null,
	"response": "0",
	"req_time": "01-02-2017 11:41:13.076 AM",
	"restime": "2017-02-01T11:41:13.078Z",
	"reqtime": "2017-02-01T11:41:13.076Z",
	"@timestamp": "2017-02-01T11:41:13.076Z",
	"@version": "1",
  },
  "fields": {
	"req_time": [
	  1485949273076
	],
	"@timestamp": [
	  1485949273076
	],
	"restime": [
	  1485949273078
	]
  }
}

```

`reqtime` and `restime` are fetched as such, without conversion (they are date fields), but `req_time` is a converted field (using to\_char).

The problem here is, actually, reqtime and restime are displayed as wrong in Kibana Table Tab (on in JSON tab). The entries coming in Table tab are `February 1st 2017, 17:11:13.076` and `February 1st 2017, 17:11:13.078` for req\_time and res\_time respectively. This is also affecting the time range that I pick in Kibana to display logs. How can I fix this?

Thanks in advance..

---

<div class="post-metadata">

**Author:** ![elasticheart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elasticheart/32/65189_2.png) [@elasticheart](https://discuss.elastic.co/u/elasticheart)\
**Post date:** [February 2, 2017, 5:03am UTC](https://discuss.elastic.co/t/logstash-id-fetching-different-date-time-stamp-from-db/73513/2 "2017-02-02T05:03:37Z")

</div>

Issue was related with Kibana and not Logstash. Changed Kibana time zone and everything is fine.

---

<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:** [March 2, 2017, 5:04am UTC](https://discuss.elastic.co/t/logstash-id-fetching-different-date-time-stamp-from-db/73513/3 "2017-03-02T05:04:21Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
