method

now

now()
public

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

1Note

Time.now in views.

jmcnevin ยท Jul 15, 2009

Be careful if you use Time.now in views with time zone support enabled, as this will not actually do the time zone conversion.

Instead, use Time.zone.now.