module Fluent::TimeMixin::Formatter

Public Class Methods

included(mod) click to toggle source
# File lib/fluent/time.rb, line 163
def self.included(mod)
  mod.include TimeParameters
end

Public Instance Methods

time_formatter_create(type: @time_type, format: @time_format, timezone: @timezone, force_localtime: false) click to toggle source
# File lib/fluent/time.rb, line 167
def time_formatter_create(type: @time_type, format: @time_format, timezone: @timezone, force_localtime: false)
  return NumericTimeFormatter.new(type) if type != :string
  return TimeFormatter.new(format, true, nil) if force_localtime

  localtime = @localtime && (timezone.nil? && !@utc)
  TimeFormatter.new(format, localtime, timezone)
end