fix timezone - time with local timezone to default timezone
This commit is contained in:
@@ -13,7 +13,7 @@ class Api::BillController < Api::ApiController
|
||||
if params[:booking_id].present?
|
||||
booking = Booking.find(params[:booking_id])
|
||||
if booking.booking_orders.count > 0
|
||||
if booking.checkin_at.utc.strftime("%Y-%m-%d %H:%M") > Time.now.utc.strftime("%Y-%m-%d %H:%M") && booking.checkout_at.nil?
|
||||
if booking.checkin_at > Time.current && booking.checkout_at.nil?
|
||||
@status = false
|
||||
@error_message = "Operation failed, Could not request bill!"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user