-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: migrate to java.time #8491
Comments
This feature request is about an implementation detail, not a behavior. Let's focus on behaviors. You mention that "Oct" fails to parse, but "oct" is successful, and you say java.time will solve this. However, I find that it does not solve it. Reproducing your case, using MMM with locale "es", I find both Joda-Time and java.time are reject "Oct" and accept "oct" when locale is "es"
|
You are right, this was about an implementation detail at the beginning As months (and days) in spanish have first letter capital, parsing uppercased strings should work. So, this was an issue to fix how current implementation (which uses joda.time) does the parsing. However. as joda.time is deprecated, I then suggested ensuring this case-sensitive issue would be fixed when/if migrated to java.time. |
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.
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 #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
The text was updated successfully, but these errors were encountered: