# Setting the correct timezone in date filter plugin

**URL:** https://discuss.elastic.co/t/setting-the-correct-timezone-in-date-filter-plugin/143457
**Category:** Logstash
**Created:** [August 8, 2018, 8:47am UTC](https://discuss.elastic.co/t/setting-the-correct-timezone-in-date-filter-plugin/143457 "2018-08-08T08:47:51Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![espogian](https://avatars.discourse-cdn.com/v4/letter/e/4491bb/32.png) [@espogian](https://discuss.elastic.co/u/espogian)
#### Post date: [August 8, 2018, 8:47am UTC](https://discuss.elastic.co/t/setting-the-correct-timezone-in-date-filter-plugin/143457/1 "2018-08-08T08:47:52Z")

</div>

Hello,

I'm using a date filter plugin to match a date field, which is in the format yyyy-MM-dd (so the field does not provide the time, for example 2018-07-03). My desire would be to obtain Logstash parsing the date @00:00:00 my local time. Here's the filter I'm using

```
date {
	match => ["timestamp_field", "yyyy-MM-dd"]
	timezone => "UTC"
	target => "timestamp_field"
}

```

No matter if I use `timezone => "UTC"` or `timezone => "Europe/Rome"` (which is my local timezone), I always get the time in this format:

```
July 3rd 2018, 02:00:00.000

```

While I would like to get

```
July 3rd 2018, 00:00:00.000

```

By comparison, the field `@timestamp`, which contains the log parsing time, is perfectly correct.  
What could be the issue here?

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [August 8, 2018, 2:07pm UTC](https://discuss.elastic.co/t/setting-the-correct-timezone-in-date-filter-plugin/143457/2 "2018-08-08T14:07:29Z")

</div>

> [@espogian](#):
>
> July 3rd 2018, 02:00:00.000

Are you seeing that format in Kibana? If so, that is working correctly. Elasticsearch stores the date in UTC, and Kibana will adjust that to Europe/Rome if that is the timezone your browser uses. If you want Kibana to display UTC you can change that in Management / Advanced Settings - dateFormat:tz

---

<div class="post-metadata">

### Author: ![Charaf\_Ahmed](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/charaf_ahmed/32/30467_2.png) [@Charaf\_Ahmed](https://discuss.elastic.co/u/Charaf_Ahmed)
#### Post date: [August 8, 2018, 2:11pm UTC](https://discuss.elastic.co/t/setting-the-correct-timezone-in-date-filter-plugin/143457/3 "2018-08-08T14:11:36Z")

</div>

```
date {
match => ["timestamp_field", "yyyy-MM-dd +0200"]
timezone => "UTC"
target => "timestamp_field"
}

```

TRY

---

<div class="post-metadata">

### Author: ![espogian](https://avatars.discourse-cdn.com/v4/letter/e/4491bb/32.png) [@espogian](https://discuss.elastic.co/u/espogian)
#### Post date: [August 8, 2018, 2:12pm UTC](https://discuss.elastic.co/t/setting-the-correct-timezone-in-date-filter-plugin/143457/4 "2018-08-08T14:12:57Z")

</div>

I tried to change that, but without luck

[Edit] I have re-indexed data and now is displayed correctly 🙂

---

<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: [September 5, 2018, 2:13pm UTC](https://discuss.elastic.co/t/setting-the-correct-timezone-in-date-filter-plugin/143457/5 "2018-09-05T14:13:02Z")

</div>

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