diff --git a/app/models/dining_facility.rb b/app/models/dining_facility.rb index 1b245b24..9948ec48 100755 --- a/app/models/dining_facility.rb +++ b/app/models/dining_facility.rb @@ -78,13 +78,13 @@ class DiningFacility < ApplicationRecord def get_checkout_booking booking = self.get_current_checkout_booking if booking - now = Time.now.utc + now = Time.now.utc.getlocal hr = (now.strftime("%H").to_i).to_int min = (now.strftime("%M").to_i).to_int if !booking.checkout_at.nil? - checkout_at = booking.checkout_at.utc - checkout_at_hr = (checkout_at.utc.strftime("%H").to_i).to_int - checkout_at_min = (checkout_at.utc.strftime("%M").to_i).to_int + checkout_at = booking.checkout_at.utc.getlocal + checkout_at_hr = (checkout_at.strftime("%H").to_i).to_int + checkout_at_min = (checkout_at.strftime("%M").to_i).to_int checkout_at_min -= min if (checkout_at_hr <= hr) && (checkout_at_min <= 15) return booking diff --git a/app/views/origami/home/show.html.erb b/app/views/origami/home/show.html.erb index 780ace0b..6d83f852 100755 --- a/app/views/origami/home/show.html.erb +++ b/app/views/origami/home/show.html.erb @@ -132,7 +132,11 @@