method
now
![Moderate documentation Importance_2](https://d2vfyqvduarcvs.cloudfront.net/images/importance_2.png?1349367920)
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
Register or
log in
to add new notes.
jmcnevin -
July 15, 2009
![Default_avatar_30](https://www.gravatar.com/avatar/10e0464f0818fa6e181caa78d3db3241?default=http://apidock.com/images/default_avatar_30.png&size=30)
0 thanks
Time.now in views.
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.