Skip to content

Commit

Permalink
Update patterns/grok-patterns
Browse files Browse the repository at this point in the history
Fix the hour pattern to accept single digit hours, fixes an issue with timestamps like that: "2013-02-21 6:23:46"
  • Loading branch information
alexkoltun committed Feb 21, 2013
1 parent 541e914 commit 9d26770
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion patterns/grok-patterns
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ YEAR (?>\d\d){1,2}
# I'm still on the fence about using grok to perform the time match,
# since it's probably slower.
# TIME %{POSINT<24}:%{POSINT<60}(?::%{POSINT<60}(?:\.%{POSINT})?)?
HOUR (?:2[0123]|[01][0-9])
HOUR (?:2[0123]|[01]?[0-9])
MINUTE (?:[0-5][0-9])
# '60' is a leap second in most time standards and thus is valid.
SECOND (?:(?:[0-5][0-9]|60)(?:[:.,][0-9]+)?)
Expand Down

0 comments on commit 9d26770

Please sign in to comment.