Class: Time

Inherits:
Object
  • Object
show all
Defined in:
lib/fluent/plugin/extensions/time.rb

Overview

extensions for Time class

provides formater
- to epoch millisecond format
- to iso format with millisecond

Instance Method Summary collapse

Instance Method Details

#to_epochmillisObject



8
9
10
# File 'lib/fluent/plugin/extensions/time.rb', line 8

def to_epochmillis
  (to_f * 1000).to_i
end

#to_isoObject



12
13
14
# File 'lib/fluent/plugin/extensions/time.rb', line 12

def to_iso
  iso8601(3)
end