diff --git a/lib/tasks/homework_publishtime.rake b/lib/tasks/homework_publishtime.rake index 2f999384c..440c04a09 100644 --- a/lib/tasks/homework_publishtime.rake +++ b/lib/tasks/homework_publishtime.rake @@ -18,7 +18,7 @@ namespace :homework_publishtime do if str != "" str += "," end - str += "('#{name_str}',#{homework.id},#{student.student_id}, '#{format_time(Time.now)}', '#{format_time(Time.now)}')" + str += "('#{name_str}',#{homework.id},#{student.student_id}, '#{Time.now}', '#{Time.now}')" end sql = "insert into student_works (name, homework_common_id,user_id, created_at, updated_at) values" + str ActiveRecord::Base.connection.execute sql