change utc to utc.getlocal
This commit is contained in:
@@ -2,12 +2,12 @@ class Origami::CheckInProcessController < BaseOrigamiController
|
||||
|
||||
def check_in_process
|
||||
lookup_checkout_time = Lookup.collection_of("checkout_time")
|
||||
checkout_at = Time.now.utc
|
||||
checkout_at = Time.now.utc.getlocal
|
||||
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.strftime("%H:%M%p")
|
||||
end_time = Time.parse(arr_time[1].strip).utc.strftime("%H:%M%p")
|
||||
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
|
||||
checkout_at = checkout_at + (checkout_time[1]).to_i.minutes
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user