instance method
now
Ruby on Rails 4.2.9
Since v2.2.3Signature
now()
Returns an ActiveSupport::TimeWithZone instance representing the current time in the time zone represented by self.
Time.zone = 'Hawaii' # => "Hawaii" Time.zone.now # => Wed, 23 Jan 2008 20:24:27 HST -10:00
Source
# File activesupport/lib/active_support/values/time_zone.rb, line 377
def now
time_now.utc.in_time_zone(self)
end
Defined in activesupport/lib/active_support/values/time_zone.rb line 377
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::TimeZone