diff --git a/app/models/p_hire.rb b/app/models/p_hire.rb index aa6291e..19ffcfc 100644 --- a/app/models/p_hire.rb +++ b/app/models/p_hire.rb @@ -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|