Merge pull request #371 from alexkoltun/patch-1

Make 'HOUR' accept single-digit hours.
This commit is contained in:
Jordan Sissel 2013-02-26 12:14:02 -08:00
commit d05407e29c

View file

@ -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]+)?)