Method: ActiveSupport::TimeZone#local

Defined in:
activesupport/lib/active_support/values/time_zone.rb

#local(*args) ⇒ Object

Method for creating new ActiveSupport::TimeWithZone instance in time zone of self from given values.

Time.zone = 'Hawaii'                    # => "Hawaii"
Time.zone.local(2007, 2, 1, 15, 30, 45) # => Thu, 01 Feb 2007 15:30:45 HST -10:00

354
355
356
357
# File 'activesupport/lib/active_support/values/time_zone.rb', line 354

def local(*args)
  time = Time.utc(*args)
  ActiveSupport::TimeWithZone.new(nil, self, time)
end