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

@@ -12,13 +12,13 @@ class Promotion < ApplicationRecord
PROMO_TYPE4 = "Percentage"
def is_promo_day
promo_day.include? Date.today.wday.to_s
promo_day.include? Date.current.wday.to_s
end
def self.promo_activate(saleObj)
current_day = Time.now.strftime("%Y-%m-%d")
current_time = Time.now.strftime('%H:%M:%S')
day = Date.today.wday
current_day = Time.current.strftime("%Y-%m-%d")
current_time = Time.current.strftime('%H:%M:%S')
day = Date.current.wday
promoList = is_between_promo_datetime(current_day,current_time)
promoList.each do |promo|