Module: Fluent::TimeMixin

Defined in:
lib/fluent/time.rb

Defined Under Namespace

Modules: Formatter, Parser, TimeParameters

Constant Summary collapse

TIME_TYPES =
['string', 'unixtime', 'float', 'mixed']
TIME_PARAMETERS =
[
  [:time_format, :string, {default: nil}],
  [:localtime, :bool, {default: true}],  # UTC if :localtime is false and :timezone is nil
  [:utc,       :bool, {default: false}], # to turn :localtime false
  [:timezone, :string, {default: nil}],
  [:time_format_fallbacks, :array, {default: []}], # try time_format, then try fallbacks
]
TIME_FULL_PARAMETERS =
[
  # To avoid to define :time_type twice (in plugin_helper/inject)
  [:time_type, :enum, {default: :string, list: TIME_TYPES.map(&:to_sym)}],
] + TIME_PARAMETERS