logstash/elasticsearch failed to parse date field tried both date format [dateOptionalTime], and timestamp number with locale
<p>for some reason, logstash (version 1.5) can't process logs with this exception:</p>

<p><em>{:timestamp=>"2016-04-26T09:20:12.141000-0400", :message=>"Failed parsing date from field", :field=>"time", :value=>"2016-04-26T09:20:03.520-04:00", :exception=>java.lang.IllegalArgumentException: Invalid format: "2016-04-26T09:20:03.520-04:00" is malformed at "T09:20:03.520-04:00", :level=>:warn}</em></p>

<p>My Time field in json is:</p>

<pre><code>"time":"25-04-2016 04:21:06.786"
</code></pre>

<p>my logstash configuration is:</p>

<pre><code>filter {

if [type] == "json" {
   json {
        source =&gt; "message"
        }
    date {
      match =&gt; [ "time", "dd-MM-yyyy HH:mm:ss", "dd-MM-yyyy HH:mm:ss:SSS", "dd-MM-yyyy HH:mm:ss.SSS", "yyyy-MM-dd HH:mm:ss,SSS" ]
    }    
     }
}
</code></pre>

<p>On Elasticsearch side I see this exception:</p>

<p><em>failed to parse date field [25-04-2016 04:48:14.305], tried both date format [dateOptionalTime], and timestamp number with locale []
java.lang.IllegalArgumentException: Invalid format: "25-04-2016 04:48:14.305" is malformed at "16 04:48:14.305"</em></p>

<p>How do I fix this?</p>