fix recurring todos where new todos were not placed in tickler

there was a Date.now in the code that was not migrated to the new timezone handling
This commit is contained in:
Reinier Balt 2008-10-02 09:49:51 +02:00
parent ba9a9370cc
commit 0f4a80d839

View file

@ -703,9 +703,9 @@ class TodosController < ApplicationController
if @todo.from_recurring_todo?
@recurring_todo = current_user.recurring_todos.find(@todo.recurring_todo_id)
date_to_check = @todo.due.nil? ? @todo.show_from : @todo.due
date_to_check = Date.today()-1.day if date_to_check.nil?
date_to_check = Time.zone.now-1.day if date_to_check.nil?
if @recurring_todo.active? && @recurring_todo.has_next_todo(date_to_check)
date = date_to_check >= Date.today() ? date_to_check : Date.today()-1.day
date = date_to_check >= Time.zone.now ? date_to_check : Time.zone.now-1.day
@new_recurring_todo = create_todo_from_recurring_todo(@recurring_todo, date)
end
end