do not compare at_midnight in different timezones.

Use localtime to make sure both dates are in the
same timezone
This commit is contained in:
Reinier Balt 2015-04-13 15:33:22 +02:00
parent f3c36e6e04
commit 006c135a64
3 changed files with 11 additions and 11 deletions

View file

@ -93,7 +93,7 @@ module RecurringTodos
# TODO: recheck if future rails versions have this problem too
start = Time.utc(start.year, start.month, start.day)+n.months
end
Time.zone.local(start.year, start.month, every_x_day)
Time.zone.local(start.year, start.month, every_x_day).localtime.at_midnight
end
def find_relative_day_of_month(start, n)