From 0f4a80d839d0092ead30c1591db41c93b659811b Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Thu, 2 Oct 2008 09:49:51 +0200 Subject: [PATCH] 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 --- app/controllers/todos_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/todos_controller.rb b/app/controllers/todos_controller.rb index 3f36f194..e2034522 100644 --- a/app/controllers/todos_controller.rb +++ b/app/controllers/todos_controller.rb @@ -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