Date reverts to 2000-01-01 from ActiveRecord to MySQL
问题 I am trying to save a time in a MySQL table. However, the date reverts to 2000-01-01. 1.9.2p320 :036 > vv = Visitor.new => #<Visitor id: nil, ip_address: nil, num_day_visits: nil, last_visit: nil> 1.9.2p320 :037 > vv.last_visit = Time.now; vv.ip_address = "3.3.3.3" => "3.3.3.3" 1.9.2p320 :038 > vv.num_day_visits = 1 => 1 1.9.2p320 :039 > vv => #<Visitor id: nil, ip_address: "3.3.3.3", num_day_visits: 1, last_visit: "2012-10-11 01:31:04"> 1.9.2p320 :040 > vv.save SQL (0.2ms) BEGIN SQL (0.7ms)