fix timezone
This commit is contained in:
@@ -10,7 +10,7 @@ class Menu < ApplicationRecord
|
||||
scope :active, -> {where("is_active = true")}
|
||||
|
||||
def self.current_menu
|
||||
today = DateTime.now
|
||||
today = Time.current
|
||||
day_of_week = today.wday
|
||||
menus = Menu.where("is_active = true and '#{today.strftime("%H:%M")}' between TIME(valid_time_from) and TIME(valid_time_to)")
|
||||
current_menu = nil
|
||||
|
||||
Reference in New Issue
Block a user