rails - convert DateTime to UTC before saving to server
问题 I don't know how, but my console and my server have two different timezones for DateTime.now. If I run DateTime.now in my console, the following is returned: Wed, 04 Dec 2013 14:27:23 -0500 However, I have the following in my Task model: def self.already_expired where("time_frame < ?", DateTime.now) end The goal of the code above is to fire off some task methods on tasks where 'time_Frame' is a past date. Here is where i call the method: task :change_it => :environment do puts "yo yo you yo