remove unnessary timezone convertion
This commit is contained in:
@@ -2,14 +2,14 @@ class Origami::CheckInProcessController < BaseOrigamiController
|
||||
|
||||
def check_in_process
|
||||
lookup_checkout_time = Lookup.collection_of("checkout_time")
|
||||
today = Time.now.utc.getlocal
|
||||
checkout_at = Time.now.utc.getlocal
|
||||
today = Time.now
|
||||
checkout_at = Time.now
|
||||
|
||||
if !lookup_checkout_time.empty?
|
||||
lookup_checkout_time.each do |checkout_time|
|
||||
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")
|
||||
start_time = Time.parse(arr_time[0].strip).strftime("%H:%M%p")
|
||||
end_time = Time.parse(arr_time[1].strip).strftime("%H:%M%p")
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user