diff --git a/app/controllers/api/check_in_process_controller.rb b/app/controllers/api/check_in_process_controller.rb index 45d3ed1a..12075a50 100644 --- a/app/controllers/api/check_in_process_controller.rb +++ b/app/controllers/api/check_in_process_controller.rb @@ -47,7 +47,7 @@ class Api::CheckInProcessController < Api::ApiController arr_time = checkout_time[0].split("-") start_time = Time.parse(arr_time[0].strip).utc.getlocal.strftime("%H:%M%p") end_time = Time.parse(arr_time[1].strip).utc.getlocal.strftime("%H:%M%p") - if start_time <= checkout_at && checkout_at <= end_time + if start_time <= checkout_at.strftime("%H:%M%p") && checkout_at.strftime("%H:%M%p") <= end_time checkout_at = checkout_at + (checkout_time[1]).to_i.minutes end end diff --git a/app/controllers/origami/check_in_process_controller.rb b/app/controllers/origami/check_in_process_controller.rb index 8f28c365..bab40a83 100644 --- a/app/controllers/origami/check_in_process_controller.rb +++ b/app/controllers/origami/check_in_process_controller.rb @@ -8,7 +8,7 @@ class Origami::CheckInProcessController < BaseOrigamiController arr_time = checkout_time[0].split("-") start_time = Time.parse(arr_time[0].strip).utc.getlocal.strftime("%H:%M%p") end_time = Time.parse(arr_time[1].strip).utc.getlocal.strftime("%H:%M%p") - if start_time <= checkout_at && checkout_at <= end_time + if start_time <= checkout_at.strftime("%H:%M%p") && checkout_at.strftime("%H:%M%p") <= end_time checkout_at = checkout_at + (checkout_time[1]).to_i.minutes end end