lib/ougai/formatters/base.rb in ougai-1.6.6 vs lib/ougai/formatters/base.rb in ougai-1.7.0

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + require 'time' require 'socket' module Ougai module Formatters @@ -63,13 +65,10 @@ def format_datetime(time) time.strftime(@datetime_format) end def default_datetime_format - t = Time.new - f = '%FT%T.%3N' - f << (t.utc? ? 'Z' : '%:z') - f.freeze + "%FT%T.%3N#{(Time.new.utc? ? 'Z' : '%:z')}" end def self.parse_new_params(args) idx = args.index {|i| i.is_a?(Hash) } return args if idx == 2