I'm trying to set the timestamps manually. Can't get it to do anything but set it to the current time when it saves. Please help. (it's on heroku)
desc "restore timestamps for updated_at in questions" task "restore_timestamps" do require 'time' require File.dirname(RAILS_ROOT) + '/mnt/config/boot' require File.dirname(RAILS_ROOT) + '/mnt/config/environment'
str = "2010-11-05 14:49:13 UTC"
q = Question.find(1) q.class.record_timestamps = false q.updated_at = Time.parse(str) q.save! q.class.record_timestamps = true
# still shows new timestamp end