Overhaul of Time.now stuff because Time.now is unaware of time zones. Need to use Time.zone.now (Time.now.utc works fine when dealing with the database, since it is *always* in UTC)

This commit is contained in:
Eric Allen 2008-09-21 18:03:35 -07:00
parent f52a2eafa8
commit 3647d79587
10 changed files with 60 additions and 60 deletions

View file

@ -173,7 +173,7 @@ class ApplicationController < ActionController::Base
if show_from_date.nil?
todo.show_from=nil
else
todo.show_from = show_from_date < Time.now.utc ? nil : show_from_date
todo.show_from = show_from_date < Time.zone.now ? nil : show_from_date
end
saved = todo.save