# Unable to parse logstash date filter

**URL:** <https://discuss.elastic.co/t/unable-to-parse-logstash-date-filter/357539>\
**Category:** Logstash\
**Created:** [April 16, 2024, 6:42pm UTC](https://discuss.elastic.co/t/unable-to-parse-logstash-date-filter/357539 "2024-04-16T18:42:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johnson\_will](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/johnson_will/32/123002_2.png) [@Johnson\_will](https://discuss.elastic.co/u/Johnson_will)\
**Post date:** [April 16, 2024, 6:42pm UTC](https://discuss.elastic.co/t/unable-to-parse-logstash-date-filter/357539/1 "2024-04-16T18:42:11Z")

</div>

Unable to parse logstash date filter  
SOURCE = 2024-04-16 18:29:01.178 -0400  
LOGSTASH = "start\_time" =\> 2024-04-16T18:29:01.178Z,

LOGSTASH DATE FILTER

```auto
date{
     match => ["[start_time]" , "yyyy-MM-dd HH:mm:ss.SSSZ"]
     timezone => "America/Toronto"
     target => "@timestamp"
}

```

---

<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:** [April 16, 2024, 7:41pm UTC](https://discuss.elastic.co/t/unable-to-parse-logstash-date-filter/357539/2 "2024-04-16T19:41:00Z")

</div>

Since your source includes a timezone offset the timezone option on the date filter will be ignored.

```
input { generator { count => 1 lines => ['{ "start_time": "2024-04-16 18:29:01.178 -0400" } }'] codec => json } }

output { stdout { codec => rubydebug { metadata => false } } }
filter {
    date{
        match => ["[start_time]" , "yyyy-MM-dd HH:mm:ss.SSS Z"]
        timezone => "Europe/London"
        target => "@timestamp"
    }
}

```

produces

```
"@timestamp" => 2024-04-16T22:29:01.178Z,
"start_time" => "2024-04-16 18:29:01.178 -0400"

```
