How do I save a current date/time for a DATETIME column in rails 3?

activerecord, ruby, ruby-on-rails, ruby-on-rails-3

Solution

Perhaps a way to simplify that code:

user = User.create(:last_profile_update => Time.now)

Problem

I have a DATETIME column called last_profile_update. I need to update it with a current time. I have the following code: ``` user = User.new user.last_profile_update = Date.today user.save ``` but it does not work.

Original source