today(sg=ITALY) public

Create a new Date object representing today.

sg specifies the Day of Calendar Reform.

Show source
Register or log in to add new notes.
February 4, 2010
1 thank

Warning! Be aware of Active Record TimeZone

With the timezone support introduced in Rails 2.1 the idea is that all dates in the database are stored in UTC and all dates in Ruby are in a local timezone.

Time.zone.now == Time.now # => false