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

@@ -105,7 +105,7 @@ class Crm::DiningQueuesController < BaseCrmController
booking = Booking.create({:dining_facility_id => params[:table_id],
:type => type,
:checkin_at => Time.now.utc,
:checkin_at => Time.current,
:customer_id => queue.customer_id,
:booking_status => "assign"})
booking.save!

View File

@@ -3,8 +3,8 @@ class Crm::HomeController < BaseCrmController
@booking = Booking.all
@customer = Customer.all
from = Time.now.beginning_of_day.utc
to = Time.now.end_of_day.utc
from = Time.current.beginning_of_day
to = Time.current.end_of_day
@queue = DiningQueue.where('created_at BETWEEN ? AND ?', from, to).order('queue_no ASC')
redirect_to crm_customers_path
# .where("dining_facilities.is_active=? and orders.date between ? and ?",true,from,to)