# The date filter's timezone offset match not working?

**URL:** <https://discuss.elastic.co/t/the-date-filters-timezone-offset-match-not-working/109303>\
**Category:** Logstash\
**Created:** [November 28, 2017, 3:19am UTC](https://discuss.elastic.co/t/the-date-filters-timezone-offset-match-not-working/109303 "2017-11-28T03:19:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![helloEson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/helloeson/32/28629_2.png) [@helloEson](https://discuss.elastic.co/u/helloEson)\
**Post date:** [November 28, 2017, 3:19am UTC](https://discuss.elastic.co/t/the-date-filters-timezone-offset-match-not-working/109303/1 "2017-11-28T03:19:39Z")

</div>

Hello,

I have a time field like this:  
"time\_local" =\> "23/Nov/2017:18:54:31 +0800"

And i want to use date filter to extract it to field @timestamp, so i have the filter pattern like this:  
date {  
match =\> ["time\_local", "dd/MMM/yyyy:HH:mm:ss Z"]  
}

But what i got the result looks like this:  
"time\_local" =\> "23/Nov/2017:18:54:31 +0800",  
"@timestamp" =\> 2017-11-23T10:54:31.000Z,

The letter Z does not recongized by date filter?

Thanks guys.

---

<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:** [November 28, 2017, 6:29am UTC](https://discuss.elastic.co/t/the-date-filters-timezone-offset-match-not-working/109303/2 "2017-11-28T06:29:15Z")

</div>

No, this is fine. The "Z" at the end of the `@timestamp` value just indicates that the timezone of the timestamp is UTC.

---

<div class="post-metadata">

**Author:** ![helloEson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/helloeson/32/28629_2.png) [@helloEson](https://discuss.elastic.co/u/helloEson)\
**Post date:** [November 28, 2017, 6:32am UTC](https://discuss.elastic.co/t/the-date-filters-timezone-offset-match-not-working/109303/3 "2017-11-28T06:32:58Z")

</div>

@magnusbaeck Thanks for your response. What should i do if i want to reserve the original timezone?

---

<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:** [November 28, 2017, 6:35am UTC](https://discuss.elastic.co/t/the-date-filters-timezone-offset-match-not-working/109303/4 "2017-11-28T06:35:36Z")

</div>

`@timestamp` is always UTC. This is not configurable. This topic has been discussed many times before, please check the archives.

---

<div class="post-metadata">

**Author:** ![helloEson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/helloeson/32/28629_2.png) [@helloEson](https://discuss.elastic.co/u/helloEson)\
**Post date:** [November 28, 2017, 6:37am UTC](https://discuss.elastic.co/t/the-date-filters-timezone-offset-match-not-working/109303/5 "2017-11-28T06:37:33Z")

</div>

Got it. Thanks a lot.

---

<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:** [December 26, 2017, 6:37am UTC](https://discuss.elastic.co/t/the-date-filters-timezone-offset-match-not-working/109303/6 "2017-12-26T06:37:37Z")

</div>

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