Real time in Rails
Be sure to use Time.zone.now to have real time:
>> Time.zone.now
=> Wed, 12 Dec 2012 12:12:12 UTC +00:00
>> Time.now
=> 2012-12-12 13:12:13 +0100
Written by Romain Laurent
Related protips
1 Response
Use Time.current
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#