This commit is contained in:
BoHung Chiu 2020-09-25 21:43:13 +08:00
parent 875c3dc580
commit 69e269cf59
1 changed files with 2 additions and 2 deletions

View File

@ -66,8 +66,8 @@ class PHire
unavailable_end_date = @property.end_date
unavailable_start_time = @property.start_time.to_s
unavailable_end_time = @property.end_time.to_s
unavailable_start_date = DateTime.parse(unavailable_start_date.strftime("%Y-%m-%d " + unavailable_start_time.to_s + unavailable_start_date.zone))
unavailable_end_date = DateTime.parse(unavailable_end_date.strftime("%Y-%m-%d " + unavailable_end_time.to_s + unavailable_end_date.zone))
unavailable_start_date = DateTime.parse(unavailable_start_date.strftime("%Y-%m-%d " + unavailable_start_time.to_s + Time.zone.to_s)) rescue nil
unavailable_end_date = DateTime.parse(unavailable_end_date.strftime("%Y-%m-%d " + unavailable_end_time.to_s + Time.zone.to_s)) rescue nil
unavailable_weekdays = @property.weekdays.collect{|w| w.to_i}
@recurring_events = self.where(:property_id => property_id, :recurring_end_date.gte => start_date)
@recurring_events.each do |re|