# Dateformat exception

**URL:** <https://discuss.elastic.co/t/dateformat-exception/127774>\
**Category:** Logstash\
**Created:** [April 12, 2018, 8:54am UTC](https://discuss.elastic.co/t/dateformat-exception/127774 "2018-04-12T08:54:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tim.van.rooijen](https://avatars.discourse-cdn.com/v4/letter/t/a4c791/32.png) [@tim.van.rooijen](https://discuss.elastic.co/u/tim.van.rooijen)\
**Post date:** [April 12, 2018, 8:54am UTC](https://discuss.elastic.co/t/dateformat-exception/127774/1 "2018-04-12T08:54:36Z")

</div>

Hi  
Working on some dashboards and I’m stuck on how to handle datetimes. Beginner with elasticsearch  
Have a bunch off data from a database which I import with logstash. All datetimes without a timezone and the whole project uses dutch times.  
Select dates as following from database: 2018-04-10 10:20:17.657  
Now in elasticsearch the times are converted to utc so they are displayed incorrectly now.  
My plan now is to try convert the datetime in logstash to utc time.  
Is this correct approach or would you choose a different one?

Testen with a datefilter like this:  
filter {  
date {  
match =\> ["@timestamp", "yyyy-MM-dd HH:mm:ss.SSS"]  
timezone =\> "Europe/Amsterdam"  
}  
}  
But stuck on the following exception:  
"\_dateparsefailure  
Hope somebody can help me  
Kind regards  
Tim

---

<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:** [April 12, 2018, 12:19pm UTC](https://discuss.elastic.co/t/dateformat-exception/127774/2 "2018-04-12T12:19:33Z")

</div>

Most likely a case of [https://github.com/logstash-plugins/logstash-filter-date/issues/95](https://github.com/logstash-plugins/logstash-filter-date/issues/95), see the issue comments for a workaround.

---

<div class="post-metadata">

**Author:** ![tim.van.rooijen](https://avatars.discourse-cdn.com/v4/letter/t/a4c791/32.png) [@tim.van.rooijen](https://discuss.elastic.co/u/tim.van.rooijen)\
**Post date:** [April 13, 2018, 8:10am UTC](https://discuss.elastic.co/t/dateformat-exception/127774/3 "2018-04-13T08:10:01Z")

</div>

Thank you!! Point me in the correct direction.  
Ended up using:  
jdbc\_default\_timezone =\> "Europe/Amsterdam"

In the jdbc driver

---

<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:** [May 11, 2018, 8:10am UTC](https://discuss.elastic.co/t/dateformat-exception/127774/4 "2018-05-11T08:10:06Z")

</div>

Closed on May 11, 2018, 8:10am UTC

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