method

today

v1_8_7_330 - Show latest stable - Class: Date
today(sg=ITALY)
public

Create a new Date object representing today.

sg specifies the Day of Calendar Reform.

1Note

Warning! Be aware of Active Record TimeZone

ypetya ยท Feb 4, 20101 thank

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

http://marklunds.com/articles/one/402