mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-24 03:00:12 +01:00
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:
parent
c5cff97f3f
commit
a3f23c60e4
4 changed files with 74 additions and 6 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue