# Logstash date filter converting TIMESTAMP field to my local zone?

**URL:** <https://discuss.elastic.co/t/logstash-date-filter-converting-timestamp-field-to-my-local-zone/88260>\
**Category:** Logstash\
**Created:** [June 5, 2017, 11:12am UTC](https://discuss.elastic.co/t/logstash-date-filter-converting-timestamp-field-to-my-local-zone/88260 "2017-06-05T11:12:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yaswanth](https://avatars.discourse-cdn.com/v4/letter/y/94ad74/32.png) [@Yaswanth](https://discuss.elastic.co/u/Yaswanth)\
**Post date:** [June 5, 2017, 11:12am UTC](https://discuss.elastic.co/t/logstash-date-filter-converting-timestamp-field-to-my-local-zone/88260/1 "2017-06-05T11:12:38Z")

</div>

HI,

I have logs in with following TIMESTAMP field in it and i am sending them to ES using logstash.

```
[2017-05-18 00:00:05,871]
[2017-05-18 00:00:06,161]
[2017-05-18 00:00:06,249]
[2017-05-18 15:30:06,339]

```

Normally if i parse this field through logstash using grok it will convert it into string , so i have used date filter for this:

```
 date {
    match => ["TIMESTAMP" , "yyyy-MM-dd HH:mm:ss,SSS"]
    target => "TIMESTAMP"
  }

```

When i seen in the output it is reducing `-05.30h` from each TIMESTAMP field . The output i got is like this:

```
"TIMESTAMP" => "2017-05-17T18:30:05.871Z",
"TIMESTAMP" => "2017-05-17T18:30:06.161Z",
"TIMESTAMP" => "2017-05-17T18:30:06.249Z",
"TIMESTAMP" => "2017-05-17T18:30:06.290Z",
 "TIMESTAMP" => "2017-05-18T10:00:06.339Z",

```

When i seen same TIMESTAMP field in the kibana i am getting original `TIMEFIELD` value. If logstash is sending the files to kibana then kibana also should has the reduced TIMEFIELD but it has correct one. Why ?

Thanks

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [June 7, 2017, 6:14am UTC](https://discuss.elastic.co/t/logstash-date-filter-converting-timestamp-field-to-my-local-zone/88260/3 "2017-06-07T06:14:30Z")

</div>

The date filter always converts to UTC time because that's what ES stores. Kibana by default adjusts timestamps to the browser's timezone.

---

<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, 6:14am UTC](https://discuss.elastic.co/t/logstash-date-filter-converting-timestamp-field-to-my-local-zone/88260/4 "2017-07-05T06:14:33Z")

</div>

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