Announcement (2017-05-07): www.ruby-forum.com is now read-only since I
unfortunately do not have the time to support and maintain the forum any
more. Please see rubyonrails.org/community and ruby-lang.org/en/community
for other Rails- und Ruby-related community platforms.

I defines a table and one of its column type is Time. I use ruby Time
class to assign the value to this column, but it always generate Sat Jan
01 2000 time. Is the format different with the database and ruby class?
I use MySql database in Linux.

Do created_at and updated_at (via t.timestamps) get set properly? I
think you could try using t.timestamp (not plural) instead of t.time.
Or, instead of using "sexy migrations", you could try doing it the old
way:
t.column :my_time_column, :datetime
Hope this helps,
Jason Arora

jasoo24 wrote:
> Do created_at and updated_at (via t.timestamps) get set properly? I> think you could try using t.timestamp (not plural) instead of t.time.>> Or, instead of using "sexy migrations", you could try doing it the old> way:> t.column :my_time_column, :datetime>> Hope this helps,> Jason Arora
How can I migrate this schema without breaking this table? I have tried
to run "rake db:migrate" but it doesn't work.