fix timezone
This commit is contained in:
@@ -6,8 +6,8 @@ class Crm::DiningQueuesController < BaseCrmController
|
||||
# GET /crm/dining_queues.json
|
||||
def index
|
||||
today = Time.current.strftime('%Y-%m-%d')
|
||||
@dining_queues = DiningQueue.where("DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = ? and status is NULL ", today).order("queue_no asc")
|
||||
@complete_queue = DiningQueue.where("DATE_FORMAT(CONVERT_TZ(created_at,'+00:00', Time.zone.formatted_offset),'%Y-%m-%d') = ? and status = 'Assign' ", today).order("queue_no asc")
|
||||
@dining_queues = DiningQueue.where("DATE_FORMAT(CONVERT_TZ(created_at, '+00:00', '<%= Time.zone.formatted_offset %>'), '%Y-%m-%d') = ? and status is NULL ", today).order("queue_no asc")
|
||||
@complete_queue = DiningQueue.where("DATE_FORMAT(CONVERT_TZ(created_at, '+00:00', '<%= Time.zone.formatted_offset %>'), '%Y-%m-%d') = ? and status = 'Assign' ", today).order("queue_no asc")
|
||||
|
||||
if params[:term]
|
||||
@customer = Customer.order(:name).where('lower(name) LIKE ?', "%#{params[:term].downcase}%")
|
||||
|
||||
Reference in New Issue
Block a user