mirror of
https://github.com/elastic/logstash.git
synced 2025-04-23 22:27:21 -04:00
parent
51949602f2
commit
0f790649bc
1 changed files with 1 additions and 1 deletions
|
@ -134,7 +134,7 @@ class LogStash::Filters::Date < LogStash::Filters::Base
|
|||
parser = lambda { |date| joda_parser.parseMillis(date) }
|
||||
when "UNIX" # unix epoch
|
||||
parser = lambda do |date|
|
||||
raise "Invalid UNIX epoch value '#{date}'" unless /^\d+(\.\d+)?$/ === date || date.is_a?(Numeric)
|
||||
raise "Invalid UNIX epoch value '#{date}'" unless /^\d+(?:\.\d+)?$/ === date || date.is_a?(Numeric)
|
||||
(date.to_f * 1000).to_i
|
||||
end
|
||||
when "UNIX_MS" # unix epoch in ms
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue