checkin checkout time fun:

This commit is contained in:
phyusin
2018-11-27 19:04:32 +06:30
parent 30f0852f56
commit f5ba08ae25
2 changed files with 28 additions and 16 deletions

View File

@@ -183,7 +183,7 @@ class DiningFacility < ApplicationRecord
def check_time(time, booking = nil, type)
status = true
today = Time.now.utc.strftime("%Y-%m-%d %H:%M")
check_time = Time.parse(time.strip).utc.strftime("%Y-%m-%d %H:%M")
check_time = time.strftime("%Y-%m-%d %H:%M")
if type.downcase == "checkin"
if check_time < today
status = false