Feature request: migrate to java.time
- Dominant language
- Java
- Stars
- 14.9k
- Forks
- 3.5k
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 88
Description
Hi
During some tests with Logstash 6.0.0-rc1 we have encountered a few errors parsing dates from different locales (some logs come in English, while other come in other languages) and, **it looks like it could be related to Joda-Time being case-sensitive**.
```
...
mutate {
add_field => {
"date" => "11/Oct/2017:13:30:26 +0200"
}
}
date {
timezone => "Europe/Madrid"
match => ["date", "dd/MMM/yyyy:HH:mm:ss Z"]
locale => "es"
tag_on_failure => "error_date"
}
...
```
Specifically, If month pattern MMM is used and Joda expects 'oct' but found 'Oct'
Examples: https://discuss.elastic.co/t/timestamp-month-name-date-matching/25538
**Is there any other function Logstash could use to be case-insensitive instead?** https://stackoverflow.com/a/10797809
**As stated by their own page (http://www.joda.org/joda-time/) migrating to java.time is advised.**
As requested in https://github.com/elastic/logstash/issues/7149, I would like to ask for a _library_ parameter to enable the usage of java.time instead of Joda-Time in the event of backwards-compatibility issues. Otherwise a complete migration would be gracefully welcomed.
On the other hand, it would be really good knowing if there's a workaround, other than lowercasing month strings in order Joda being able to parse date in a case-insensitive manner.
Thanks,
Regards
CC: @magnusbaeck
Contributor guide
Assessment
This issue has not been assessed yet.