You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The date filter exhibits very odd behaviour if a user erroneously uses DD instead of dd for the match pattern to parse the numeric day values.
DD should return an integer value of the number of the day in the year, e.g. 27 for the 27th of January, 35 for the 4th February etc.
When DD is erroneously placed in a pattern which parses day values, the value of the day is correctly shown in the output, however the month ends up hard coded to 01.
Correct filter config:
date {
match => [ "source_field", "yyyy-MM-dd HH:mm:ss" ]
}
Errant filter config:
date {
match => [ "source_field", "yyyy-MM-DD HH:mm:ss" ]
}
date {
match => [ "source_field", "yyyy-MM-DD HH:mm:ss" ]
}
@deepybee Seems possible - looks like what is happening is DD is being read as the day of the year, so when the date 2018-05-15 09:29:38 is interpreted using the yyyy-MM-DD HH:mm:ss date format, it is being read as the 15th day of the year - ie the 15th of January - this stackoverflow question about the Joda Time library asks the same question:
The
date
filter exhibits very odd behaviour if a user erroneously usesDD
instead ofdd
for the match pattern to parse the numeric day values.DD
should return an integer value of the number of the day in the year, e.g.27
for the 27th of January,35
for the 4th February etc.When
DD
is erroneously placed in a pattern which parses day values, the value of the day is correctly shown in the output, however the month ends up hard coded to 01.Correct filter config:
Errant filter config:
The text was updated successfully, but these errors were encountered: