fix timezone

This commit is contained in:
Thein Lin Kyaw
2023-02-09 14:55:43 +06:30
parent c580cc731a
commit 944f7a7259
52 changed files with 238 additions and 236 deletions

View File

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