# Date filter - Timezone error

**URL:** https://discuss.elastic.co/t/date-filter-timezone-error/93465
**Category:** Logstash
**Created:** [July 17, 2017, 10:30pm UTC](https://discuss.elastic.co/t/date-filter-timezone-error/93465 "2017-07-17T22:30:28Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![sslv](https://avatars.discourse-cdn.com/v4/letter/s/c2a13f/32.png) [@sslv](https://discuss.elastic.co/u/sslv)
#### Post date: [July 17, 2017, 10:30pm UTC](https://discuss.elastic.co/t/date-filter-timezone-error/93465/1 "2017-07-17T22:30:28Z")

</div>

Hi,  
I have the following date filter:

````auto
				{
					timezone => "America/Los_Angeles"
					match => ["logtime", "M/dd/YYYY HH:mm:ss a"]
				}```

input is : 
6/30/2017 11:00:00 PM

And the expected output is: 2017-07-01T06:00:00.000Z
but the logstash is giving output as: 2017-06-30T18:00:00.000Z

I have no idea why this is happening.Is it because of PM? please help.
````

---

<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: [July 18, 2017, 2:10pm UTC](https://discuss.elastic.co/t/date-filter-timezone-error/93465/2 "2017-07-18T14:10:14Z")

</div>

HH in date patterns is for 24-hour clocks. Use hh instead.

---

<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: [August 15, 2017, 2:11pm UTC](https://discuss.elastic.co/t/date-filter-timezone-error/93465/3 "2017-08-15T14:11:07Z")

</div>

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