fixes #786 where timezone handling of RoR screwed the algorithm to find the last sunday of march in 2009

Fix is a bit of a hack, see #786 for futher explanation.
This commit is contained in:
Reinier Balt 2008-10-22 10:16:31 +02:00
parent c5cff97f3f
commit a3f23c60e4
4 changed files with 74 additions and 6 deletions

View file

@ -170,11 +170,12 @@ class ApplicationController < ActionController::Base
# set dates
todo.recurring_todo_id = rt.id
todo.due = rt.get_due_date(date)
# make sure that show_from is not in the past
show_from_date = rt.get_show_from_date(date)
if show_from_date.nil?
todo.show_from=nil
else
# make sure that show_from is not in the past
todo.show_from = show_from_date < Time.zone.now ? nil : show_from_date
end