Issue: overlaps? method doesn't return expect value.
(start_on.to_i..end_on.to_i).overlaps?(ti.start_time.to_i..ti.end_time.to_i)
It returns false, but should be true.
start_on: 2016-08-19 11:00:00 +0200
end_on: 2016-08-19 12:00:00 +0200
ti.start_time: 2000-01-01 08:00:00 UTC
ti.end_time: 2000-01-01 12:00:00 UTC
Hours like 11:00-12:00 overlaps with 08:00-12:00. Why method returns false? All columns in database are type of time. Current date is caused by Time.parse method.
I suppose that problem is with date second part of times have 2000 year, but first 2016. Anyone know how to fix it?