From 132465272620fef79b94bf252d1e11dd7dd79bb3 Mon Sep 17 00:00:00 2001 From: Eric Allen Date: Sun, 7 Sep 2008 06:38:00 -0700 Subject: [PATCH] Handle timezones properly in defer buttons --- app/controllers/todos_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/todos_controller.rb b/app/controllers/todos_controller.rb index d4f95738..3f36f194 100644 --- a/app/controllers/todos_controller.rb +++ b/app/controllers/todos_controller.rb @@ -388,7 +388,7 @@ class TodosController < ApplicationController @source_view = params['_source_view'] || 'todo' numdays = params['days'].to_i @todo = Todo.find(params[:id]) - @todo.show_from = (@todo.show_from || Time.now.to_date) + numdays.days + @todo.show_from = (@todo.show_from || @todo.user.date) + numdays.days @saved = @todo.save respond_to do |format|