Method: ActiveSupport::TimeZone#now

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

#nowObject

Returns an ActiveSupport::TimeWithZone instance representing the current time in the time zone represented by self. Example:

Time.zone = 'Hawaii'  # => "Hawaii"
Time.zone.now         # => Wed, 23 Jan 2008 20:24:27 HST -10:00


284
285
286
# File 'lib/active_support/values/time_zone.rb', line 284

def now
  Time.now.utc.in_time_zone(self)
end