remove unnessary timezone convertion

This commit is contained in:
Thein Lin Kyaw
2022-04-19 19:40:53 +06:30
parent 3c7fd0aff4
commit 3c5416a154
154 changed files with 321 additions and 321 deletions

View File

@@ -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