fix timezone - time with local timezone to default timezone

This commit is contained in:
pyaephyoeaung
2022-05-19 14:20:55 +06:30
parent 7598a96e60
commit 214712fd2d
48 changed files with 294 additions and 305 deletions

View File

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