class Fluent::Time

Public Instance Methods

timezone(timezone = 'UTC') click to toggle source
# File lib/fluentd/plugin/out_syslog.rb, line 93
def timezone(timezone = 'UTC')
  old = ENV['TZ']
  utc = self.dup.utc
  ENV['TZ'] = timezone
  output = utc.localtime
  ENV['TZ'] = old
  output
end